Blogger Information
Blog 10
fans 0
comment 0
visits 8124
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
vw,vh实现手机端布局
php还在初学
Original
737 people have browsed it

html代码如下:
```html
<!DOCTYPE html>

<html lang="">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>vw,vh实现手机端布局</title>
</head>
<style>
body {
margin: 0px;
}
.box1 {
width: 80vw;
height: 20vh;
background-color: darkgoldenrod;

  1. }
  2. .box2 {
  3. width: 80vw;
  4. height: 60vh;
  5. background-color: darkorchid;
  6. }
  7. .box3 {
  8. width: 80vw;
  9. height: 20vh;
  10. background-color: darkred;
  11. }
  12. .center {
  13. margin: auto;
  14. border-radius: 0.5em;
  15. font: bold 2rem "微软雅黑";
  16. text-align: center;
  17. }

</style>
<body>
<div class="box1 center">头部区</div>
<div class="box2 center">内容区</div>
<div class="box3 center">尾部区</div>
</body>
</html>

```

Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:很有创意
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post