瀏覽器 CSS Hack 收集

來源:互聯網
上載者:User
  所謂的Hack就是只有特定瀏覽器才能識別這段hack代碼。Hack 不是什麼好東西,除非沒有辦法,我們盡量還是不要用著玩意。 下面是各個瀏覽器的CSS Hack 列表。

 Firefox 瀏覽器

@-moz-document url-prefix() {  .selector {    property: value;  }}

  支援所有Gecko核心的瀏覽器 (包括Firefox)

*>.selector { property: value; }

 Webkit 核心瀏覽器

@media screen and (-webkit-min-device-pixel-ratio: 0) {  Selector {    property: value;  }}

 Opera 瀏覽器

html:first-child>b\ody Selector {property:value;}

 IE 瀏覽器

  IE 瀏覽器針對不同的版本有不同個Hack方式。

  IE 9

:root Selector {property: value\9;}

  IE 9-

Selector {property: value\9;}

  IE 8

Selector {property: value/;}或:@media \0screen {    Selector {property: value;}}

  IE 8+

Selector {property: value\0;}

  IE 7

*+html Selector{property:value;}或:*:first-child+html Selector {property:value;}

  IE 7-

Selector {*property: value;}

  IE6

Selector {  _property: value;}或者: *html Selector {  property: value;}

聯繫我們

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