html5页面 meta icon,HTML5常用<meta>屏幕适配标签设置

本文介绍了移动Web优化的关键技术,包括viewport的设置,如width、height、initial-scale、minimum-scale和maximum-scale,以及user-scalable的控制,以确保在不同设备上良好显示。此外,还提到了电话号码在iPhone上的显示处理,通过telephone=no防止自动识别为拨号链接。对于苹果设备,详细阐述了如何设置apple-touch-icon和apple-touch-startup-image以提升WebApp的用户体验,包括启动画面的定制。同时,讨论了如何通过设置apple-mobile-web-app-capable和statusBarStyle来实现WebApp的全屏显示和状态条颜色定制。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

适应手机端

width - viewport的宽度 height - viewport的高度

initial-scale - 初始的缩放比例

minimum-scale - 允许用户缩放到的最小比例

maximum-scale - 允许用户缩放到的最大比例

user-scalable - 用户是否可以手动缩放

下面是我们经常用到的一些标签,由于浏览器的差异,并不能百分百兼容

在iPhone 手机上默认值是(电话号码显示为拨号的超链接):

可将telephone=no,则手机号码不被显示为拨号链接

apple-touch-icon:

如果 apple-mobile-web-app-capable 设置为 yes 了,那么在苹果机的safari上可以通过添加到主屏按钮将网站添加到主屏幕上。而设置相应 apple-touch-icon 标签,则添加到主屏上的图标就会使用我们指定的图片。

apple-touch-startup-image:

基于 apple-mobile-web-app-capable 设置为 yes ,可以为WebApp设置一个类似NativeApp的启动画面。和 apple-touch-icon 不同, apple-mobile-web-app-capable 不支持sizes属性,要使用media来加载不同的启动画面。

网站开启对web app程序的支持

- 在web app应用下状态条(屏幕顶部条)的颜色

- 默认值为default(白色),可以定为black(黑色)和black-translucent(灰色半透明)。

- 若值为“black-translucent”将会占据页面px位置,浮在页面上方(会覆盖页面20px高度–iphone4和itouch4的Retina屏幕为40px)。

参考:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="javax.servlet.http.HttpServletRequest"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head> <body> <table width="400" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="../proinfomgmt/ProInfolist.jsp" target="mainFrame">商品基本信息列表</a></td> </tr> <tr> <td><a href="../proinfomgmt/QueryProInfoSelectVal.jsp" target="mainFrame">商品列表查询</a></td> </tr> <tr> <td><a href="../proinfomgmt/QueryProInfo.jsp" target="mainFrame">查询商品基本信息</a></td> </tr> <tr> <td><a href="../proinfomgmt/QueryProInfoMultConds.jsp" target="mainFrame">多条件查询学生基本信息</a></td> </tr> <tr> <td><a href="../proinfomgmt/AddProInfo.jsp" target="mainFrame">添加商品基本信息</a></td> </tr> <tr> <td><a href="../proinfomgmt/ProInfolistforModi.jsp" target="mainFrame">修改或删除商品基本信息</a></td> </tr> <tr> <td><a href="../invinfomgmt/Invinfolist.jsp" target="mainFrame">库存信息列表</a></td> </tr> <tr> <td><a href="../invinfomgmt/QueryInvInfoMultConds.jsp" target="mainFrame">多条件查询库存信息</a></td> </tr> <tr> <td><a href="../invinfomgmt/QueryInvInfoSelectVal.jsp" target="mainFrame">库存列表查询</a></td> </tr> <tr> <td><a href="../Inbinfomgmt/AddInbInfo.jsp" target="mainFrame">添加入库信息</a></td> </tr> <tr> <td><a href="../Inbinfomgmt/InbInfolistforModi.jsp" target="mainFrame">修改或删除入库信息</a></td> </tr> <tr> <td><a href="../Outinfomgmt/AddOutInfo.jsp" target="mainFrame">添加出库信息</a></td> </tr> <tr> <td><a href="../Outinfomgmt/OutInfolistforModi.jsp" target="mainFrame">修改或删除出库信息</a></td> </tr> <tr> <td><a href="../userinfomgmt/UserInfolistforModi_1.jsp" target="mainFrame">员工重置密码</a></td> </tr> <% String operator_id = (String) request.getSession().getAttribute("user"); //下一句不能用== if ("U202340848".equals(operator_id)) { %> <tr> <td><a href="../userinfomgmt/AddUserInfo.jsp" target="mainFrame">管理员添加员工信息</a></td> </tr> <tr> <td><a href="../userinfomgmt/UserInfolist_1.jsp" target="mainFrame">管理员查看员工列表</a></td> </tr> <tr> <td><a href="../userinfomgmt/UserInfolistforModi.jsp" target="mainFrame">管理员重置员工密码和删除员工信息</a></td> </tr> <tr> <td><a href="../userinfomgmt/QueryUserInfoSelectVal.jsp" target="mainFrame">管理员通过列表查询员工信息</a></td> </tr> <tr> <td><a href="../userinfomgmt/QueryUserInfo.jsp" target="mainFrame">管理员精准查询员工信息</a></td> </tr> <% } if ("".equals(operator_id)) { System.out.println("无session");//测试用 %> <%} %> </table> </body> </html>
07-06
你是顶级ui设计大师,请使用bootstrap5帮我重新设计这个页面。 <!DOCTYPE html> <html><head> <!-- IEバージョン設定 --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11"> <title>他社移管入出庫 メニュー画面</title> <!-- CSS設定 --> <link rel="stylesheet" type="text/css" href="./TSOCMS/resources/css/tsocms.css"> </head> <body> <br><br> <br><br> <br><br> <div align="center"> <div class="menuDaiTitle">他社移管入出庫システム メインメニュー (Ver.2.0.3)</div> <div align="center" class="menuDiv"> <fieldset class="fieldMenu"> <legend align="left" class="menuTitle">他社移管入出庫システム</legend> <div class="logininfo"> testjmtでログインしています <button type="button" name="logoutButton" value="logoutButton" class="logoutButton" onclick="location.href='/TSOCMS/login/dologout'">ログアウト</button> </div> <table class="menuTable"> <tbody> <tr align="center"> <td> <button type="button" name="menuButton1" value="menuButton1" class="menuButton1" onclick="location.href='/TSOCMS/capture'">CSV取込</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton2" value="menuButton2" class="menuButton2" onclick="location.href='/TSOCMS/search'">検索・照合</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton3" value="menuButton3" class="menuButton1" onclick="location.href='/TSOCMS/reportmail'">報告メール</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton4" value="menuButton4" class="menuButton2" onclick="location.href='/TSOCMS/master'">マスタ管理</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton7" value="menuButton7" class="menuButton1" onclick="location.href='/TSOCMS/changepass'">パスワード変更</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton8" value="menuButton8" class="menuButton2" onclick="location.href='/TSOCMS/usermasterlist'">ユーザ管理</button> </td> </tr> </tbody> </table> </fieldset> </div> </div> </body> </html> 你是顶级ui设计大师,请使用bootstrap5帮我重新设计这个页面。 <!DOCTYPE html> <html><head> <!-- IEバージョン設定 --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11"> <title>他社移管入出庫 メニュー画面</title> <!-- CSS設定 --> <link rel="stylesheet" type="text/css" href="./TSOCMS/resources/css/tsocms.css"> </head> <body> <br><br> <br><br> <br><br> <div align="center"> <div class="menuDaiTitle">他社移管入出庫システム メインメニュー (Ver.2.0.3)</div> <div align="center" class="menuDiv"> <fieldset class="fieldMenu"> <legend align="left" class="menuTitle">他社移管入出庫システム</legend> <div class="logininfo"> testjmtでログインしています <button type="button" name="logoutButton" value="logoutButton" class="logoutButton" onclick="location.href='/TSOCMS/login/dologout'">ログアウト</button> </div> <table class="menuTable"> <tbody> <tr align="center"> <td> <button type="button" name="menuButton1" value="menuButton1" class="menuButton1" onclick="location.href='/TSOCMS/capture'">CSV取込</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton2" value="menuButton2" class="menuButton2" onclick="location.href='/TSOCMS/search'">検索・照合</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton3" value="menuButton3" class="menuButton1" onclick="location.href='/TSOCMS/reportmail'">報告メール</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton4" value="menuButton4" class="menuButton2" onclick="location.href='/TSOCMS/master'">マスタ管理</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton7" value="menuButton7" class="menuButton1" onclick="location.href='/TSOCMS/changepass'">パスワード変更</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton8" value="menuButton8" class="menuButton2" onclick="location.href='/TSOCMS/usermasterlist'">ユーザ管理</button> </td> </tr> </tbody> </table> </fieldset> </div> </div> </body> </html>
最新发布
07-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值