Commit bfeb8e36 authored by agping's avatar agping

bug

parent 3eaa9f86
...@@ -3,19 +3,49 @@ ...@@ -3,19 +3,49 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title></title> <title></title>
<script type=text/javascript>(function(doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function() {
var clientWidth = docEl.clientWidth;
if(!clientWidth) return;
if(clientWidth >= 640) {
docEl.style.fontSize = '100px';
} else {
docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
var div = document.createElement('div');
div.style.width = '1.4rem';
div.style.height = '0';
document.body.appendChild(div);
var ideal = 140 * clientWidth / 750;
var rmd = (div.clientWidth / ideal);
if(rmd > 1.2 || rmd < 0.8) {
docEl.style.fontSize = 100 * (clientWidth / 750) / rmd + 'px';
}
document.body.removeChild(div);
};
};
if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);</script>
<style type="text/css"> <style type="text/css">
body{ body{
padding: 10px 15px; padding: .1rem .15rem;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 100px; margin-bottom: 1rem;
} }
p{ p{
color: #666; color: #666;
line-height: 36px; font-size: .24rem;
}
h4{
font-size: .32rem;
} }
.text-two{ .text-two{
text-indent: 2em; text-indent: 2em;
} }
</style> </style>
</head> </head>
<body> <body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment