复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> *{ margin: 0; padding: 0; } .main{ width: 1300px; height: 1000px; background-color: #8B0000; margin: 10px auto; } .header{ height: 70px; background-color: pink; } .body{ width:1000px ; height: 800px; background-color: white; margin: 20px auto; } .main .body .banner{ height: 200px; background-color: pink; } .main .body .middleboxes{ margin-top: 20px; height: 200px; background-color: pink; } .main .body .downboxes{ margin-top: 20px; height: 360px; background-color: pink; } .main .body .middleboxes .smallboxes, .main .body .downboxes .bigboxes{ float: left; width:235px ; height: 100%; background-color: yellow; margin-right: 20px; } .main .body .middleboxes .smallboxes.last, .main .body .downboxes .bigboxes.last { margin-right: 0; } .main .footer{ margin-top: 20px; height:110px; background-color: pink; } </style> </head> <body> <div class="main"> <div class="header">header</div> <div class="body"> <div class="banner">banner </div> <div class="middleboxes"> <div class="smallboxes">1</div> <div class="smallboxes">2</div> <div class="smallboxes">3</div> <div class="smallboxes last">4</div> </div> <div class="downboxes"> <div class="bigboxes"></div> <div class="bigboxes"></div> <div class="bigboxes"></div> <div class="bigboxes last"></div> </div> </div> <div class="footer">footer</div> </div> </body> </html>
最后
以上就是无聊衬衫最近收集整理的关于前端学习笔记-12盒子模型布局案例的全部内容,更多相关前端学习笔记-12盒子模型布局案例内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复