- 博客(4)
- 收藏
- 关注
原创 垂直居中的方法
<div class="main"> <div class="box1"> </div> </div> 1.使用绝对定位 <style> html,body{ width: 100%; height: 100%; margin: 0; padding: 0; } .main{ /* 给父级增加相对定位 */ position: relative; ...
2022-05-05 23:50:48
88
原创 前端面试:清除浮动的方法
1.给父元素设置overflow:hidden 2.给父级定义height,设置高度 3.使用空标签清除浮动,增加clear:both 4.使用after伪对象清除浮动
2022-05-05 23:05:09
277
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅