層疊樣式表與css3基礎

來源:互聯網
上載者:User

標籤:style   io   color   ar   sp   on   art   cti   bs   

在定義樣式的時候,如果不先定義body元素,body中的其他元素是否就不會顯示,如h、p等標籤:

<!doctype html><!--告知該文檔是HTML5文檔-->
<html>
<head>
<meta charset="utf-8">
<link href="style.css" rel="stylesheet" />
<title>無標題文檔</title>
</head>

<body>
<h1>body 區塊(section)標題</h1>
<p>HTML5文檔由不同的區塊構成。</p>
<h2>HTML5中新增的區塊元素</h2>
<ul>
<li>section</li>
<li>article</li>
<li>nav</li>
<li>aside</li>
</ul>
<h2>中國網頁瀏覽器的佔有率</h2>
</body>
</html>

// C# Document
@charset "utf-8";
/*body{
font-size:75%;16px*0.75=12px
line-height:1.5;12px*1.5=18px
}*/
h1,h2{
color:#3fb8eb;
}

 

// C# Document
@charset "utf-8";
body{
font-size:75%;/*16px*0.75=12px*/
line-height:1.5;/*12px*1.5=18px*/
}
h1,h2{
color:#3fb8eb;
}

層疊樣式表與css3基礎

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.