css
嘴角翘翘
这个作者很懒,什么都没留下…
展开
-
水平垂直居中
<div class="father"> <div class="son"></div> </div> 1:margin:anto .father { background-color: aquamarine; width: 400px; height: 400px; position: relative; } .son { background-color: brown; width: 200px;原创 2022-04-01 15:21:00 · 132 阅读 · 0 评论 -
创建 BFC(块格式化上下文) 的方式
根元素() 浮动元素(元素的 float 不是 none) 绝对定位元素(元素的 position 为 absolute 或 fixed) 行内块元素(元素的 display 为 inline-block) 表格单元格(元素的 display 为 table-cell,HTML表格单元格默认为该值) 表格标题(元素的 display 为 table-caption,HTML表格标题默认为该值) 匿名表格单元格元素(元素的 display 为 table、table-row、 table-row-group、原创 2020-09-14 19:12:15 · 457 阅读 · 0 评论