
HTML:
<div class="forshow middle">
<div class="flex"></div>
<div class="img_setH"><img src="shop_orderD_forshow.png">为你推荐</div>
<div class="flex"></div>
</div>
css:
.forshow{ width: 100%; height: 40px; padding: 0 10px; display: flex; display: -webkit-box; display: -moz-box; -webkit-box-pack: center; -moz-box-pack: center; -webkit-box-align: center; -moz-box-align: center; -webkit-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box;} .forshow .img_setH{ padding: 0 10px; font-size: 15px; color: #333333;} .forshow .img_setH img{ width: 13px; height: 12.5px; display: inline-block; margin-right: 5px;} .forshow .flex{ -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; height: 1px; background: #cccccc; -webkit-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box;}
我们用了盒子模型进行布局
博客展示了一段HTML代码和对应的CSS代码,HTML部分包含特定类名的div元素及图片展示,CSS代码对元素样式进行了详细设置,如宽度、高度、颜色等,还提到使用盒子模型进行布局。
858

被折叠的 条评论
为什么被折叠?



