显示移动友好的网页,而无需放大 [英] Showing mobile friendly web page without having to zoom in
本文介绍了显示移动友好的网页,而无需放大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试创建一个使用下面的code移动友好的网页。当我通过HTC渴望观看我必须放大才能看到正确的尺寸。我怎样才能得到它,而无需再放大正常显示?
<%@页面语言=C#AutoEventWireup =真codeBehind =Default.aspx.cs继承=MobileSite._Default%GT;
!< DOCTYPE HTML PUBLIC - // WAPFORUM // DTD XHTML 1.2的移动// ENhttp://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd\">< HTML的xmlns =http://www.w3.org/1999/xhtml><头=服务器>
<标题>我的手机网站< /标题>
< /头>
<车身风格=宽度:480像素>
<表ID =形式=服务器>
< DIV>
测试< BR />
测试< BR />
测试
< / DIV>
< /表及GT;
< /身体GT;
< / HTML>
解决方案
我不知道如果HTC支持视窗meta标签以同样的方式在iPhone,但你可以试试:
< META NAME =视CONTENT =WIDTH = 320/>
(或一些其它宽度)或
< META NAME =视CONTENT =初始规模= 1/>
im trying to create a mobile friendly web page using the code below. When i view it over a HTC desire i have to zoom in to see the correct size. How can i get it to display normally without having to zoom in?
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MobileSite._Default" %>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>My Mobile Site</title>
</head>
<body style="width: 480px">
<form id="form" runat="server">
<div>
Test<br />
Test<br />
Test
</div>
</form>
</body>
</html>
解决方案
I'm not sure if the HTC supports the viewport meta tag the same way the iPhone does, but you can try:
<meta name="viewport" content="width = 320" />
(or some other width) or:
<meta name="viewport" content="initial-scale=1" />
这篇关于显示移动友好的网页,而无需放大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文