《2018年10月24日》【连续386天】
标题:css三大特性复习,背景,购物车实例;
内容:
* {
margin: 0;
padding: 0;
}
/*p,h1等元素内不能放块级元素*/
/*a里不可放a*/
/*a里可以放块级元素*/
/*行高是基线到基线*/
/*三大特性:*/
/*1.层叠性(冲突且权重相同,就就近覆盖)*/
/*2.继承性*/
/*3.css优先级(权重)*/
/*继承的权重是零*/
body {
/*background-image: url();
background-repeat:
repeat:背景图像在纵向和横向上平铺
no-repeat: 背景图像不平铺
repeat-x: 背景图像在横向上平铺
repeat-y: 背景图像在纵向上平铺*/
/*background-position: ;*/
}
body {
background-attachment: fixde;
/*fixed 固定的*/
/*background:背景颜色 背景图片地址 背景平铺 背景滚动 背景位置; */
}
购物车:
<a href="#"></a>
* {
margin: 0;
padding: 0;
}
a {
width: 67px;
height: 32px;
background: url(110.png);
display: block;
}
a:hover {
background-position: left bottom;
}