首页 > 其他 > 详细

图片对齐问题

时间:2015-06-06 18:07:36      阅读:122      评论:0      收藏:0      [点我收藏+]

  

 1 <html >
 2 
 3 <head>
 4     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5 <style type="text/css">
 6 img.top {vertical-align:text-top}
 7 img.bottom {vertical-align:text-bottom}
 8 </style>
 9 </head>
10 
11 <body>
12 
13 <p>
14 这是一幅<img class="top" border="0" src="./1.jpg" width="80" heigh="60"/>位于段落中的图像。
15 </p> 
16 
17 <p>
18 这是一幅<img class="bottom" border="0" src="./1.jpg" width="80" height="40" />位于段落中的图像。
19 </p>
20 
21 <!-- 相反的状态 -->
22 <p>
23 这是一幅<img class="bottom" border="0" src="./1.jpg" width="80" height="40" />位于段落中的图像。
24 </p>
25 <p>
26 这是一幅<img class="top" border="0" src="./1.jpg" width="80" heigh="60"/>位于段落中的图像。
27 </p> 
28 
29 </body>
30 
31 </html>

技术分享

第一第二这种排版是相对来说比较好的

图片对齐问题

原文:http://www.cnblogs.com/zzzzw/p/4556919.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!