hmt5初学小技巧
图片替换技术:
1.利用行高
.hanggao{
width: 154px;
height: 30px;
background-image: url(../img/logo_db.png);
overflow: hidden;
}
.hanggao a{
display: block;
/*background: red;*/
line-height: 200px;
}
2.利用首行缩进
.shuojin2{
width: 154px;
height: 30px;
background-image: url(../img/logo_db.png);
text-indent: -1000px;
}
.shuojin a{
display: block;
}
3.利用定位
.dingwei{
width: 154px;
height: 30px;
font-size: 12px;
color: transparent;
text-decoration: none;
position: relative;
}
.dingwei span{
width: 154px;
height: 30px;
background-image: url(../img/logo_db.png);
position: absolute;
top: 0;
left: 0;
}
<a href="#" class="dingwei 3A">
<span></span>
dingweijishu
</h1>
</a>