鼠标移动上去怎么会消失呢,你用下面的代码运行,看看问题出在哪里了。
hao123
.header{
width: 960px; /*这个div根据你写的替换就行了*/
height: 40px;
margin: 5px auto;
background-color: yellow; /*没用你去掉就行*/
}
.header p{
display: block;
width: auto;
line-height: 14px;
background: url("sethome.png") no-repeat left center; /*你的图标路径*/
padding-left: 20px;
}
.header p a{
text-align: left;
text-decoration: underline;
color: red;
font-size: 12px;
}
设为主页