1. 程式人生 > >css基礎 一個元素有多個類名

css基礎 一個元素有多個類名

.com ide htm ack visual css基礎 logs 基礎 tps

禮悟:
   公恒學思合行悟,尊師重道存感恩。葉見尋根三返一,江河湖海同一體。
虛懷若谷良心主,願行無悔給最苦。讀書鍛煉養身心,誠勸且行且珍惜。


   ide:visual studio 2017  
browser:Chrome
os:win7

代碼

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <meta charset="utf-8" />
 5     <meta name
="author" content="https://www.cnblogs.com/jizuiku"/> 6 <title></title> 7 <style type="text/css"> 8 .fcolor-white { 9 color:white; 10 } 11 .bgcolor-grey { 12 background-color:grey; 13 } 14 </style> 15 </head
> 16 <body> 17 <!-- 18 可以存在多個類名,類名之間用空格隔開 19 20 在CSS文件保持不變的情況下, 21 class="fcolor-white bgcolor-grey" 22 23 class="bgcolor-grey fcolor-white" 24 效果是相同的 25 此處有深意! 26 --> 27 <div
class="fcolor-white bgcolor-grey">博客園</div> 28 </body> 29 </html>

效果

技術分享圖片


CSS3優秀,值得學習。
學習資源: www.w3cschool.cn + itcast和itheima視頻庫 + 清凈的心地。
如果您有公開的資源,可以分享給我的話,用您的資源學習也可以。
博文是觀看視頻後,融入思考寫成的。博文好,是老師講得好。博文壞,是 給最苦 沒認真。

css基礎 一個元素有多個類名