<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style type="text/css">
body{
/*内容居中*/
margin: 10px auto;
width: 70%;
height: auto;
background-color: darkgoldenrod;
}
.image{
border: 1px solid darkgrey;
width: auto;
height: auto;
/*包裹图片*/
float: left;
text-align: center;
margin: 5px;;
}
img{
margin: 5px;
/*透明度*/
opacity: 1;
}
.text{
font-size:12px;
margin-bottom: 5px;;
}
</style>
</head>
<body>
<div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div>
<div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div>
<div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div><div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div><div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div>
<div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div>
<div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div>
<div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div>
<div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div>
<div class="image">
<a href="#" target="_self">
<img src="http://img.xiaba.cvimage.cn/4cbc56c1a57e26873c140000.jpg" alt="a" width="150px;height:150px"/>
</a>
<div class="text">这是一张测试图处</div>
</div>
</body>
</html>
html css学习笔记-图片操作实例
最新推荐文章于 2019-08-08 09:13:09 发布