网页head

pc网页

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>网站名称</title>
<meta name="keywords" content="网页关键字">
<meta name="description" content="网页内容描述">
<link rel="bookmark" type="image/x-icon" href="图标地址">
<link rel="shortcut icon" type="image/x-icon" href="图标地址">
<link rel="stylesheet" type="text/css" href="reset.css文件地址">
兼容性
</head>
<body></body>
</html>

mobile网页

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>网站名称</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<link rel="stylesheet" type="text/css" href="reset.css文件地址">
<script>
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
docEl.style.fontSize = 100 * (clientWidth / 640) + 'px';
};
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
</script>
</head>
<body></body>
</html>

bootstrap网页

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>网站名称</title>
<meta name="keywords" content="网页关键字">
<meta name="description" content="网页内容描述">
<link rel="bookmark" type="image/x-icon" href="图标地址">
<link rel="shortcut icon" type="image/x-icon" href="图标地址">
<link rel="stylesheet" href="bootstrap.css文件地址">
兼容性
</head>
<body></body>
</html>

上一篇:HTML5深入学习之鼠标跟随,拖拽事件


下一篇:移动端计算单位 js