欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
  <!DOCTYPEhtml>
 
  <html>
 
  <head>
 
  <metacharset="utf-8">
 
  <title>自学教程(如约智惠.com)</title>
 
  <style>
 
  div.img{
 
  margin:5px;
 
  border:1pxsolid#ccc;
 
  float:left;
 
  width:180px;
 
  }
 
  div.img:hover{
 
  border:1pxsolid#777;
 
  }
 
  div.imgimg{
 
  width:100%;
 
  height:auto;
 
  }
 
  div.desc{
 
  padding:15px;
 
  text-align:center;
 
  }
 
  </style>
 
  </head>
 
  <body>
 
  <divclass="responsive">
 
  <divclass="img">
 
  <atarget="_blank"href="http://static.runoob.com/images/demo/demo1.jpg">
 
  <imgsrc="http://static.runoob.com/images/demo/demo1.jpg"alt="图片文本描述"width="300"height="200">
 
  </a>
 
  <divclass="desc">这里添加图片文本描述</div>
 
  </div>
 
  </div>
 
  <divclass="responsive">
 
  <divclass="img">
 
  <atarget="_blank"href="http://static.runoob.com/images/demo/demo2.jpg">
 
  <imgsrc="http://static.runoob.com/images/demo/demo2.jpg"alt="图片文本描述"width="300"height="200">
 
  </a>
 
  <divclass="desc">这里添加图片文本描述</div>
 
  </div>
 
  </div>
 
  <divclass="responsive">
 
  <divclass="img">
 
  <atarget="_blank"href="http://static.runoob.com/images/demo/demo3.jpg">
 
  <imgsrc="http://static.runoob.com/images/demo/demo3.jpg"alt="图片文本描述"width="300"height="200">
 
  </a>
 
  <divclass="desc">这里添加图片文本描述</div>
 
  </div>
 
  </div>
 
  <divclass="responsive">
 
  <divclass="img">
 
  <atarget="_blank"href="http://static.runoob.com/images/demo/demo4.jpg">
 
  <imgsrc="http://static.runoob.com/images/demo/demo4.jpg"alt="图片文本描述"width="300"height="200">
 
  </a>
 
  <divclass="desc">这里添加图片文本描述</div>
 
  </div>
 
  </div>
 
  </body>
 
  </html>




 

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c55506.shtml