Float有4个值:
left :元素向左浮动。
right :元素向右浮动。
none :默认值。
inherit :从父元素继承float属性。
浮动后的div宽度会变成0,但是其内边框可能撑起它的宽和高。
* 通配符选择器
-
选择所有的标签
*{
margin:0px;
padding:0px;
}
以上的代码就是去掉所有标签的内边距padding和外边距margin
标签选择器
-
以标签名作为选择器的名字
div{
css样式...
属性:属性值;
...
}
去掉小圆点
ul{
list-style:none;
}
阴影
-
盒子阴影 box-shadow
box-shadow:x y blur spread color [inset];
示例
.box{
width:200px;
height: 200px;
border: solid 1px