要让事情改变,先改变自己;要让事情变得更好,先让自己变得更强。 ------ joker1034

css display和vertical-align 属性

display

定义和用法

display 属性规定元素应该生成的框的类型。

 1 <html>
 2 <head>
 3 <style type="text/css">
 4 p {display: inline}
 5 div {display: none}
 6 </style>
 7 </head>
 8 
 9 <body>
10 <p>本例中的样式表把段落元素设置为内联元素。</p>
11 
12 <p>而 div 元素不会显示出来!</p>
13 
14 <div>div 元素的内容不会显示出来!</div>
15 </body>
16 </html>
实例

vertical-align

定义和用法

vertical-align 属性设置元素的垂直对齐方式。

 1 <html>
 2 
 3 <head>
 4 <style type="text/css">
 5 img.top {vertical-align:text-top}
 6 img.bottom {vertical-align:text-bottom}
 7 </style>
 8 </head>
 9 
10 <body>
11 
12 <p>
13 这是一幅<img class="top" border="0" src="/i/eg_cute.gif" />位于段落中的图像。
14 </p> 
15 
16 <p>
17 这是一幅<img class="bottom" border="0" src="/i/eg_cute.gif" />位于段落中的图像。
18 </p>
19 
20 </body>
21 
22 </html>
实例

 

posted @ 2019-01-02 11:37  joker1034  阅读(345)  评论(0编辑  收藏  举报

python开发&研究 - 创建于 2018年10月

这是一位python开发工程师的个人站,内容主要是python开发方面的技术文章,大部分来自学习或工作,部分来源于网络,希望对大家有所帮助。

致力于python开发&研究工作,专注python开发,关注互联网前沿技术与趋势。


Font Awesome | Respond.js | Bootstrap中文网