![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CSS
SongHH96
这个作者很懒,什么都没留下…
展开
-
css 开发问题及解决方案
居中 1.垂直居中 {position: absolute; top: 50%; transform: translateY(-50%);} 2.水平居中(同级无其他元素) 子级设置 width、margin: 0 auto; 3.水平及垂直居中(同级有其他元素) 父级设置position: relative; 子级设置 width、 he...原创 2019-09-19 10:30:42 · 147 阅读 · 0 评论 -
css 命名规则
命名采用采用BEM形式 B即Block(块) 使用中线 ('-') 而不是小驼峰 E即Elements(元素) 使用下划线 ('_') 连接块和元素 外套 wrap ------------------用于最外层 头部 header ----------------用于头部 主要内容 main ------------用于主体内容(中部) 左侧 ma...原创 2019-09-19 10:35:55 · 121 阅读 · 0 评论