CSS-10-内边距
生活随笔
收集整理的這篇文章主要介紹了
CSS-10-内边距
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="UTF-8">
5 <title></title>
6 <style type="text/css">
7 /*內(nèi)邊距*/
8 /*在使用設(shè)置內(nèi)邊距時會改變我們元素的實(shí)際大小*/
9 /*padding:檢索或設(shè)置對象四邊的內(nèi)部邊距;*/
10 /*padding-top:檢索或設(shè)置對象頂邊的內(nèi)部邊距;*/
11 /*padding-right:檢索或設(shè)置對象右邊的內(nèi)部邊距;*/
12 /*padding-bottom:檢索或設(shè)置對象的下部內(nèi)邊距;*/
13 /*padding-left:檢索或設(shè)置對象的左部內(nèi)邊距;*/
14 .padding{
15 width: 200px;
16 height: 200px;
17 background-color: burlywood;
18 padding: 80px;/*四條內(nèi)邊距都是80px*/
19
20 line-height: 200px;
21 text-align: center;
22 }
23 </style>
24 </head>
25 <body>
26 <div class="padding">Hello World!</div>
27 </body>
28 </html>
?
轉(zhuǎn)載于:https://www.cnblogs.com/qinqin-me/p/11254885.html
總結(jié)
以上是生活随笔為你收集整理的CSS-10-内边距的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: elasticsearch的cross_
- 下一篇: 我为什么要开博客