开发者

JQUERYMobile Site Showing Up Wide like PC version

开发者 https://www.devze.com 2023-03-21 06:16 出处:网络
I switched my jquery includes to the latest versions and now my site is showing up all wide like a PC site on both android and iphone.

I switched my jquery includes to the latest versions and now my site is showing up all wide like a PC site on both android and iphone.

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.css" />
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.js"></script>

to

<link href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>

Current Head

<!DOCTYPE html>
<html>
    <head>
    <title></title>

<link href="http://code.jquery.开发者_Go百科com/mobile/latest/jquery.mobile.min.css" rel="stylesheet" type="text/css" />
    <script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
    <script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>

    </head>

Any ideas?

SOLUTION

I added <meta content="width=device-width,minimum-scale=1,maximum-scale=1" name="viewport">.and its fine now.


Better viewport value :

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi">


SOLUTION

I added .and its fine now.

<meta content="width=device-width,minimum-scale=1,maximum-scale=1" name="viewport">
0

精彩评论

暂无评论...
验证码 换一张
取 消