CSS的使用

來源:互聯網
上載者:User

CSS,主要用來顯示,和HTML分開,可以更好的顯示,
HTML負責結構;CSS負責顯示,各司其職。

使用
法1:
選擇符{屬性:屬性值}

<head標籤內>

<style>
<!--
div
{width:200; filter:blur(add=true,direction=135,strengh=20);
}  
-->
</style>

這樣,出現div的地方,都是這種顯示.

法2:
<body內>
<p style="font-size:48;font-style:bold;color:red;">hongen </p>  
這樣,P範圍內的style都是指定的樣子。

法3:
把您編輯好的CSS文檔儲存成“.CSS”檔案,然後在<head>中定義。定義的格式是這樣的:
  <head> <link rel=stylesheet href=“style.css”> …… </head>
  我們看到這裡應用了一個<Link>,“rel=stylesheet”指串連的元素是一個樣式表(stylesheet)文檔。一般這裡是不需要您改動的。

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.