|
|
|
@ -0,0 +1,45 @@
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<title></title>
|
|
|
|
|
<style>
|
|
|
|
|
body{
|
|
|
|
|
margin:0;
|
|
|
|
|
padding:0;
|
|
|
|
|
background-color: black;
|
|
|
|
|
text-align:center;
|
|
|
|
|
}
|
|
|
|
|
.container {
|
|
|
|
|
box-sizing:border-box;
|
|
|
|
|
background-color: cornflowerblue;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
transform-origin: 50% 50%;
|
|
|
|
|
width: 2400px;
|
|
|
|
|
height: 1800px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<script src="lib/jquery/jquery.min.js"></script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
var container = $('.container');
|
|
|
|
|
var bwidth = document.documentElement.clientWidth;
|
|
|
|
|
var bheight = document.documentElement.clientHeight;
|
|
|
|
|
var bs = bwidth / bheight;
|
|
|
|
|
var cs = container.width() / container.height();
|
|
|
|
|
var value = bs > cs ? (bheight / container.height()) : (bwidth / container.width());
|
|
|
|
|
container[0].style.transform = "scale(" + value +","+value+ ")";
|
|
|
|
|
$('body').width(bwidth);
|
|
|
|
|
$('body').height(bheight);
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
if (bs > cs) {
|
|
|
|
|
window.scrollTo(0, document.body.scrollHeight);
|
|
|
|
|
}
|
|
|
|
|
}, 0);
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|