css图片廊效果

作者: admin 分类: css 发布时间: 2019-02-01 21:56
<!DOCTYPE html>  
<html>  
<head> 
<meta charset="utf-8"> 
<style>  
div.img  
{  
  margin: 2px;  
  border: 1px solid #0000ff;  
  height: auto;  
  width: auto;  
  float: left;  
  text-align: center;  
}     
div.img img  
{  
  display: inline;  
  margin: 3px;  
  border: 1px solid #ffffff;  
}  
div.img a:hover img {border: 1px solid #0000ff;}  
div.desc  
{  
  text-align: center;  
  font-weight: normal;  
  width: 120px;  
  margin: 2px;  
}  
</style>  
</head>  
<body>  
<div class="img">  
 <a target="_blank" href="#"><img src="http://www.33lc.com/article/UploadPic/2012-8/201282413335761587.jpg"   
  alt="break" width="110" height="90"></a>  
 <div class="desc">我是小金毛</div>  
</div>    
<div class="img">  
 <a target="_blank" href="#"><img src="http://www.33lc.com/article/UploadPic/2012-8/201282413335761587.jpg"   
alt="break" width="110" height="90"></a>  
 <div class="desc">我也是小金毛</div>  
</div>   
<div class="img">  
 <a target="_blank" href="#"><img src="http://img.article.pchome.net/00/39/51/11/pic_lib/wm/9380092.jpg"   
alt="break" width="110" height="90"></a>  
 <div class="desc">我是雪纳瑞</div>  
</div>    
<div class="img">  
 <a target="_blank" href="#"><img src="http://img.article.pchome.net/00/39/51/11/pic_lib/wm/9380092.jpg"     
alt="break" width="110" height="90"></a>  
 <div class="desc">我也是雪纳瑞</div>  
</div>    
</body>  
</html>

发表评论

电子邮件地址不会被公开。 必填项已用*标注