我的問題出現在與JQuery Mobile組合的內部Android瀏覽器上。當我重新加載當前頁面時,內容會縮小以適應文本到列表視圖中。Android上的JQueryMobile:視口調整爲列表視圖中的文本大小
更多內容: 該代碼適用於iPhone,移動桌面工具和Android的Firefox的罰款。但是,在內部Android瀏覽器中,我在下面的代碼中出現了這個奇怪的問題。看到我的編輯如下。
我到目前爲止試過的東西: 我用視口元標記玩過很多。無論如何,我不認爲這是問題,因爲內容在我應用程序中的其他每個站點上顯示正確。
<meta name='viewport' content='width=device-width,initial-scale=1,maximum-scale=1'>
$('meta[name=viewport]').attr('content','width='+$(window).width()+',user-scalable=no');
喜歡這些帖子建議:
- JQuery Mobile Device Scaling
- Full webpage and disabled zoom viewport meta tag for all mobile browsers
我的代碼:
<html>
<head>
<meta name="viewport" content="width=650">
<!-- CSS and Scripts-->
</head>
<body>
<!-- Page Wrapper -->
<div data-role="page">
<section data-role="content">
<h2>
Code Sample
</h2>
<div class="ui-grid-solo">
<p style="margin-bottom: 38px;">
<a href="?id=a" data-ajax="false">A</a>
<a href="?id=b" data-ajax="false">B</a>
<a href="?id=c" data-ajax="false">C</a>
</p>
</div>
<!-- Dynamic content-->
<ul data-role="listview" data-inset="false">
<!-- Use ?id to grab and display data (CodeBehind.vb)-->
</ul>
</section>
</div>
</body>
</html>
有沒有人有一個想法,或者沒有與類似的問題打架?
編輯: 我到的東西,這個問題似乎在這個和平的代碼發生:在
<!-- Dynamic content-->
<ul data-role="listview" data-inset="false">
<!-- Use ?id to grab and display data (CodeBehind.vb)-->
</ul>
通常ListView控件取代與「點點點」大文字項使其適合屏幕。在我的情況下,它仍然是這樣做的,但是在縮短之前文本可以通過很多角色來實現。結果是,一切都縮小了。我應該如何解決這個問題?