用戶端編程--CSS篇

來源:互聯網
上載者:User

1.如何將樣式表添置到網頁中?
  1)內聯樣式 <h1 style="color: red;">Hello</h1>
        2)內建樣式    在<head>中使用<style type="text/css"> h1{color: red; }</style>
        3)外部樣式   在<head>中 <link href="cssName.css"  tye="text/css" rel="stylesheet">

2.為什麼CSS叫層疊樣式?
  層疊樣式表背後的概念是:多個樣式定義可以層疊向下通過多個層次來影響文檔.層次的優先順序別人小到大依次為:1.使用者瀏覽器的設定 2.外部樣式表 3.內建樣式表 4.內聯樣式

3.選取器有哪幾種?
  1.元素 p   2.ID  #top  3.class  .name  4.屬性 h[hittle]  5.包含選取器和子物件選取器 h1 b  6.通配選取器 *   7.偽類及虛擬元素選取器 a:link

4.理解盒模型
      從裡到外 邊框距(Padding)  邊框(border)  邊距(margin)

聯繫我們

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