2017-03-23 107 views
-1

我有一個網站,必須對手機進行響應。我用我的桌面創建了它。當我調整瀏覽器窗口時,它對手機非常適用,但是當我在我的真實手機上查看它時:HTC E9對手機視圖沒有響應。我已經使用wordpress請提供解決方案手機響應問題

+0

你在html頭中添加了viewport嗎?即:'' –

+0

yes,但它不適用於htc E9 – vrushali

回答

0

您正在使用哪種框架「 BOOTSTRAP 3.0「和簡單的媒體查詢。和 檢查meta標籤也是在你的頭的支持移動平臺: -

<meta name="viewport" content="width=device-width, initial-scale=1"> 

使用這個CSS也: -

@-ms-viewport{ 
    width: device-width; 
} 
0
<!DOCTYPE html> 
<html lang="en"> 
    <head> 
    <meta charset="utf-8"> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> 
    <title> responsive layout </title> 


    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> 
    <!--[if lt IE 9]> 
     <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> 
     <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 
    <![endif]--> 
    </head> 
    <body> 
    <h1>Hello, world!</h1> 

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
    </body> 
</html> 

您可以使用此標記的響應和使用媒體查詢@media (min-width:1600px) and (max-width:3600px) {根據媒體屏幕。

+0

@ -ms-viewport width:device-width; }在這裏添加代碼 – vrushali

+0

在css add @media(min-width:1600px)和(max-width:3600px){}爲響應或其他。 –