2011-09-08 20 views

回答

1

@ben;爲此需要使用mediaqueries。它是我們根據寬度定義css的新屬性。就像這樣:

<link rel="stylesheet" href="stylesheets/apx.css" type="text/css" media="screen" title="no title" /> 
<link rel="stylesheet" href="stylesheets/new-css.css" type="text/css" media="screen and (max-width: 600px)" title="no title" /> 

在上面的例子中apx.css是默認的CSS &和new-css.css申請時,你的屏幕寬度減小到600px的。

一個最好的鏈接,你的答案http://css-tricks.com/6206-resolution-specific-stylesheets/

檢查本作更http://webdesignerwall.com/tutorials/css3-media-queries

3

這是在main CSS底部的媒體查詢:

/* Smaller screens */ 

@media only screen and (max-width: 1023px) { 
    ... 
} 

@media handheld, only screen and (max-width: 767px) { 
    ... 
} 

這些應用基於不同的規則瀏覽器的維度,並通過JS class爲舊版瀏覽器提供幫助。

+0

+1實際上是查看有問題的網站的CSS而不是另一個不相關的網站。 – BoltClock