HTML---總結

來源:互聯網
上載者:User

標籤:半徑   for   box   標準   padding   otto   css hack   選項按鈕   more   

(1) margin負值能讓沒有寬度的盒子變大。

  對於有寬度的盒子,沒有浮動,只有margin-top 和margin-left 有效;如果浮動,margin-浮動方向 有效,-top有效,margin-bottom 無效。(不可能設定一個margin-bottom或者right=0px  盒子就到邊上了,如果這樣哪就差不多成定位了)

(1.1)margin的問題:

  margin-top的拖拽:子級的margin-top給了父級
    解決:給父級加上邊框
    給父級加overflow:hidden;
    用父級padding-top代替子級的margin-top

  margin的合并:
    解決:寫一個方向

(1.1)清浮動三種方法:

  1.給父級加overflow:hidden;
  2.給浮動元素同級加空div div{clear:both;}
  3.給父級加類名clearfix
    .clearfix:after{content:‘‘; display:block; clear:both;}

(2) 解決IE6下固定定位不相容的方案:http://www.css88.com/archives/673#more-673

    1 Js類比   2 CSS hack  3  IE條件注釋解決方案

(3)決對定位裡的bottom 是根據可視區來走的,並不是根據body的高度。

(4) border-radius 是CSS3的屬性,相容IE9+ ,圓角的形成原理,看,

    border-radius:50px 106px 162px 32px / 50px 80px 178px 26px; //標準文法格式,水平半徑和垂直半徑

    

(5)錨點  <a href="#one">目錄:第一章</a>     <h2 id="one"> 第一章</h2>    <a href="#">返回頂部</a>

(6)表單元素,選項按鈕

<label for="box">美女</label><input type="checkbox" id="box" />或者<label for="box">    <input type="checkbox" id="box" />美女</label>

(7)

HTML---總結

聯繫我們

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