切图的必要步骤
摘要:1.写一个reset.css,清除页面原有边距,清除列表标签格式 *{ margin: 0; padding: 0; } ul,ol{ list-style: none; } 2.对应html页面,规划好有哪几块内容,确定哪些有表芯(margin:0 auto;) 3.对应页面的style.css中
阅读全文
css居中
摘要:文本居中:style="text-align:center;line-height == heigh" 水平居中: 设置元素宽度后,设置margin: 0 auto;(把左和右外边距设置为 auto,规定的是均等地分配可用的外边距。结果就是居中的元素) margin:auto;也只是水平居中,因为“
阅读全文
清除浮动
摘要:首先,我们创建两个盒子,添加浮动做到左边一个右边一个,然后在top之后增加一个bottom块 <head> <style> .box1{ float: left; width: 100px; height: 100px; background-color: tomato; } .box2{ floa
阅读全文