首页 > 其他 > 详细

hmt5初学小技巧

时间:2016-04-10 00:55:24      阅读:369      评论:0      收藏:0      [点我收藏+]

图片替换技术:

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>

 

hmt5初学小技巧

原文:http://www.cnblogs.com/liaolei1/p/5373138.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!