码迷,mamicode.com
首页 > 其他好文 > 详细

code

时间:2018-06-23 13:25:53      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:over   mob   detection   type   initial   lis   top   javascrip   name   

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<meta name="description" content="xxxxx"/>
<meta name="keywords" content=""/>
<meta content="caibaojian" name="author"/>
<title>xxxxxxxxxxx</title>
<link rel="stylesheet" href="base.css">
<style>
#header {
position: absolute;
left: 0;
right: 0;
top: 0;
z-index: 10;
}
#content {
position: absolute;
top: 10rem;
overflow: hidden;
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-color: #666;
background-size: cover;
opacity: 1;
background-image: url(a.png);
}

</style>
<script type="text/javascript">
(function(doc, win){
var docE1 = doc.documentElement,
resizeEvt = ‘orientationchange‘ in window ? ‘orientationchange‘ : ‘resize‘,
recalc = function(){
var clientWidth = docE1.clientWidth;
if(!clientWidth) return;
alert(clientWidth);
docE1.style.fontSize = 20 * (clientWidth / 1440) + ‘px‘;
};

if (!doc.addEventListener) return;
win.addEventListener(resizeEvt,recalc,false);
doc.addEventListener(‘DOMContentLoaded‘,recalc,false);
})(document,window);
</script>
</head>

<body>
<div style="min-height: 100%;height: auto !important;">
<div id="header" style="font-size:6rem;line-height:7rem;padding-top:1.5rem;padding-bottom:1.5rem; ">
<a href="/" style="">X hahahhh</a>
</div>
<div id="content" >
</div>
<!-- 正文 -->
<div id="foot"></div>
</div>
</body>
</html>

code

标签:over   mob   detection   type   initial   lis   top   javascrip   name   

原文地址:https://www.cnblogs.com/justlikethat/p/9216834.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!