![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
#前端面试题
银河之上的你
这个作者很懒,什么都没留下…
展开
-
css中div三种水平居中方法【最常见】
基础样式<div id="dad"><div id="son></div></div><style>#dad{ width :400px; height;200px; border:3px solid green; margin:30px auto;}#son{width:100pcx;height:100px;background:purple;}</style>第一种:子元素使用margin属原创 2020-07-16 23:38:28 · 2966 阅读 · 0 评论 -
css的10种盒子水平垂直居中方法
<body><div class="wrap allCenter">//父元素<div class= "item allCenterChild"></div>//子元素</div></body>第一种:弹性布局(flex布局):父级对子元素进行垂直居中,居中属性只需要定义在父元素中<style>.wrap{//【基础设置】父元素:宽高各600px,紫色边框width: 600px;height: 600p原创 2020-07-16 23:13:44 · 3325 阅读 · 0 评论