35 lines
664 B
HTML
35 lines
664 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Document</title>
|
|
<script>
|
|
document.querySelectorAll
|
|
</script>
|
|
<style>
|
|
*{
|
|
margin:0;
|
|
padding: 0;
|
|
}
|
|
html,
|
|
body {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
.box{
|
|
width: 30%;
|
|
height: 30%;
|
|
background: pink;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
百分比实现自适应
|
|
<div class="box"></div>
|
|
</body>
|
|
|
|
</html> |