Files
apt-nl-map/static/Magic4/aa.html
2024-12-04 10:21:04 +08:00

43 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>11</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
transform-origin: 0px 0px 0px;
background: red;
/*height: 1600px;*/
}
#App1 {
position: absolute;
transform: scale(0.4);
transform-origin: 0 0;
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.js"></script>
</head>
<body>
<!-- <div class="App"> -->
<iframe id="App1" src="https://www.baidu.com/" frameborder="0"></iframe>
<!-- </div> -->
</body>
<script type="text/javascript">
// 一开始加载就适应屏幕的宽高
$(function() {
//offsetWidth: 获取body元素对象的宽度,即offsetWidth=width+padding+border availWidth:返回当前屏幕宽度
var scale = document.body.clientWidth / window.screen.availWidth;
$(document.body).css("-webkit-transform", "scale(" + scale + ")");
});
$(window).resize(function() {
var scale = document.body.clientWidth / window.screen.availWidth;
$(document.body).css("-webkit-transform", "scale(" + scale + ")");
});
</script>