2013-02-12 24 views
0

我一直在試圖建立自己的網站;我正在閱讀有關RWD(響應式網頁設計)。我遇到了IE問題。我可以爲IE瀏覽器< = 8默認樣式顯示,但我看到[1]:http://www.etondigital.com網站您可以訪問該網站,並且在禁用JavaScript的IE 7中仍然可以響應地起作用。我很難確定這種可能性。它從三列變爲一列。如果您瞭解網站的功能,那麼可以讓我知道。由於對於IE <= 8,沒有javascript的響應式網頁設計。可能嗎?

/* *** *我加入了我的代碼,並且相對於我重視我怎麼能在IE8實現及以下無JavaScript來從三排變爲一排,沒有任何鏈接注意到像伊頓數碼網站

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
     <meta charset="UTF-8"> 
     <title>Second Theme</title> 
     <meta name="viewport" content="width=device-width, initial-scale=1"/> 
      <!--so html 5 tags work in ie browsers 8 and lower--> 
     <!--[if lt IE 9]> 
     <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 
     <![endif]--> 
     <style type="text/css"> 
     body{ 
    font:normal 100% Cambria, Georgia, serif; 
    margin:10px; 
} 

.wrapper{ 
    margin: 0em auto; 
    width: 93.75%;  /* 960/1024 */ 
    background:gray; 
    padding:.625em; 

} 


.box{ 
width:29.847%;/*274/918*/ 
    float:left; 
    margin-right:2em; 
} 

.clear{ 
    clear:both; 
} 

     </style> 
    <body> 
     <div class="warapper"> 
     <aside class="bottom_sidebar"> 
      <div class="box one"> 
       <h1>One</h1> 
       <p>is simply dummy text of the printing and typesetting 
        industry. Lorem Ipsum has been the industry's standard 
        dummy text ever since the 1500s, when an unknown printer 
        took a galley of type and scrambled it to make a</p> 

      </div> 
      <div class="box"> 
       <h1>Two</h1> 
       <p>is simply dummy text of the printing and typesetting 
        industry. Lorem Ipsum has been the industry's standard 
        dummy text ever since the 1500s, when an unknown printer 
        took a galley of type and scrambled it to make a</p> 
      </div> 
      <div class="box"> 
       <h1>Three</h1> 
       <p>is simply dummy text of the printing and typesetting 
        industry. Lorem Ipsum has been the industry's standard 
        dummy text ever since the 1500s, when an unknown printer 
        took a galley of type and scrambled it to make a</p> 
      </div> 
      <div class="clear"></div> 
     </aside> 
    </div> 
    </body> 
</html> 
+0

請檢查您是否真的已禁用JavaScript。當我使用禁用腳本的IE 7模式訪問IE 9的etondigital.com網站時,它顯示爲簡單的單列布局,沒有響應。 – 2013-02-12 05:47:27

+0

@JukkaK當我縮小尺寸時,最初看到三列eton digital,它從三行變爲一行。我已禁用javascript,並在ie7模式 – user1986244 2013-02-12 05:54:08

回答

1

如果您使用基於百分比寬度爲所有的塊級元素,你可以讓你的站點響應,而無需使用@media CSS的規則。否則,您需要使用JavaScript才能讓網站響應IE中的媒體查詢。

+0

我已經添加了什麼在做什麼,我很難實現與我提供的鏈接類似的方式,eton數字站點,請看我的代碼 – user1986244 2013-02-12 05:42:45

0

最好的方法,也是最簡單的方法,是通過引導。它與IE7 +兼容,可以隨心所欲或儘可能少。它不是一個模板,而是一組預編碼類的.css文件,可以讓您在少量時間內構建最佳的響應佈局。我建議花一些時間搜索Bootstrap並閱讀所有關於細節的內容,但Bootstrap絕對是您的選擇。

http://twitter.github.com/bootstrap/index.html

+0

Bootstrap將如何解決響應性問題? bootstrap-responsive.css使用'@ media'查詢,這是IE <= 8不支持的。沒有任何預編碼類可以改變這一點。 – 2013-02-12 05:27:09

+0

@raphael我已經添加了什麼在做什麼,我很難實現與我提供的鏈接類似的方式,eton數字網站,請看我的代碼 – user1986244 2013-02-12 05:43:06

+0

你會這麼認爲,但有一些事實ie8沒有辦法支持媒體查詢。閱讀我的朋友。如果你看bootstrap的網站,你會看到他們支持IE 7 + – 2013-02-12 10:42:03