CSS 图片廊

CSS 图片廊


以下是使用CSS创建图片廊:

<!DOCTYPE html>
<html>
<head>
<title>test</title> 
<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;
  color:blue;
}
</style>
</head>
<body>

<div class="img">
 <a target="_blank" href="http://injavawetrust.iteye.com"><img src="83.gif" alt="InJavaWeTrust" width="110" height="90"></a>
 <div class="desc">InJavaWeTrust</div>
</div>
<div class="img">
 <a target="_blank" href="http://injavawetrust.iteye.com"><img src="83.gif" alt="InJavaWeTrust" width="110" height="90"></a>
 <div class="desc">InJavaWeTrust</div>
</div>
<div class="img">
 <a target="_blank" href="http://injavawetrust.iteye.com"><img src="83.gif" alt="InJavaWeTrust" width="110" height="90"></a>
 <div class="desc">InJavaWeTrust</div>
</div>
<div class="img">
 <a target="_blank" href="http://injavawetrust.iteye.com"><img src="83.gif" alt="InJavaWeTrust" width="110" height="90"></a>
 <div class="desc">InJavaWeTrust</div>
</div>

</body>
</html>

效果如下: 



  

猜你喜欢

转载自injavawetrust.iteye.com/blog/2335249