我正在开发移动版网页。我正在使用带有两个浏览器的Symbian手机进行测试。默认浏览器工作正常,但我遇到Opera Mobile问题。
每次加载页面时,它都会加载放大而不是适合屏幕。这甚至发生在这样一个简单的页面中:
<?php
echo "<p>Guys I am developing a mobile version web pages, I am testing with a symbian phone with two browsers. The default browser is working properly but I am having problem with Opera Mibile, each time it loads a page a page that is zoomed in - instead of loading a page that just fits the screan. even a simple page like this one</P>
<p>Is there anything i should include in the in my code to tell it to load a page that needs not to be zoomed. Will greatly apreciated, have spend almost the whole day on google?</p>";
?>
在我加载时,有没有办法让页面适合屏幕,而不是让它们加载放大?
非常感谢任何帮助。
答案 0 :(得分:3)
在<head>
元素中添加此内容:<meta content='width=device-width, initial-scale=1, maximum-scale=1' name='viewport' />
<html>
<head>
<meta content='width=device-width, initial-scale=1, maximum-scale=1' name='viewport' />
</head>
<body>
<p>Lorem ipsum ...</p>
</body>
</html>