1. 程式人生 > >利用css進行圖文混排

利用css進行圖文混排

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>圖片及文字的混排</title>
<style stype="text/css">
        div{
width:220px;
height:20px;
background-image:url(css/1229.png);
background-repeat:no-repeat;
line-height:16px;
text-align:center;
border-bottom:1px dotted #FF0000;
}
.a{
background-position:0px -399px;
padding-left:20px;
}

        </style>
</head>


<body>
<img src="css/845.png">
<div class="a">積小善為大善,善莫大焉</div>
<div class="a">中國志願者活動方興未艾</div>
<div class="a">老吾老以及人之老</div>
<div class="a">幼吾幼以及人之幼</div>
</body>
</html>