[英]css stylesheet on IE8, IE9
我正在開發一個Web應用程序,現在css與Opera,Chrome,Firefox和Safari完美配合。 我只是對IE8和IE9有一些具體問題。 我的疑問是,什么是最好的選擇,為IE寫一個獨家的CSS或只是為IE合並特定的行?
這適用於Chrome,Firefox,Safari和Opera:
#table{
width: 60%;
margin-top: 60px;
margin-left: auto;
margin-right: auto;
}
探險家代碼:
#table{
width: 60%;
margin-top: 60px;
margin-left: 20%;
margin-right: auto;
}
我正在尋找最快的負載選擇。 提前致謝。
我發現最簡單的方法是將調整隔離到特定於IE的樣式表中,然后使用條件注釋(只有IE才能理解)在普通CSS之后加載它們。
這是我的一個項目(ASP.NET MVC2項目)的一個例子:
<!--[if lte IE8]>
<link rel="stylesheet" type="text/css" href="<%: Url.Content("~/content/ie-fix.css") %>" />
<![endif]-->
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.