ie11媒體查詢以及其他hack

來源:互聯網
上載者:User

標籤:

<!doctype html><html> <head>  <title>IE10/11 Media Query Test</title>  <meta charset="utf-8">  <meta http-equiv="X-UA-Compatible" content="IE=edge">  <style>    @media all and (-ms-high-contrast:none)     {     .foo { color: green } /* IE10 */     *::-ms-backdrop, .foo { color: red } /* IE11 */     }  </style> </head> <body>  <div class="foo">Hi There!!!</div> </body></html>
IE 6
* html .ie6 {property:value;}
down voteIn the light of the evolving thread, I have updated the below:IE 6* html .ie6 {property:value;}or.ie6 { _property:value;}IE 7*+html .ie7 {property:value;}or*:first-child+html .ie7 {property:value;}IE 6 and 7@media screen\9 {    .ie67 {property:value;}}or.ie67 { *property:value;}or.ie67 { #property:value;}IE 6, 7 and 8@media \0screen\,screen\9 {    .ie678 {property:value;}}IE 8html>/**/body .ie8 {property:value;}or@media \0screen {    .ie8 {property:value;}}IE 8 Standards Mode Only.ie8 { property /*\**/: value\9 }IE 8,9 and 10@media screen\0 {    .ie8910 {property:value;}}IE 9 only@media screen and (min-width:0\0) and (min-resolution: .001dpcm) {  // IE9 CSS .ie9{property:value;}}IE 9 and above@media screen and (min-width:0\0) and (min-resolution: +72dpi) {  // IE9+ CSS  .ie9up{property:value;}}IE 9 and 10@media screen and (min-width:0\0) {    .ie910{property:value\9;} /* backslash-9 removes ie11+ & old Safari 4 */}IE 10 only_:-ms-lang(x), .ie10 { property:value\9; }IE 10 and above_:-ms-lang(x), .ie10up { property:value; }or@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {   .ie10up{property:value;}}IE 11 (and above..)_:-ms-fullscreen, :root .ie11up { property:value; }

原文地址 http://stackoverflow.com/questions/20541306/how-to-write-a-css-hack-for-ie-11

 

ie11媒體查詢以及其他hack

相關文章

聯繫我們

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