我正在使用背景图像<li>作为按钮,但它没有完全显示; 但是,当写文本然后显示.我不想写文本它已经打印在背景图像上.我无法设置宽度 - 我该如何解决这个问题?
#footernav li#footerlocation
{
display: inline;
padding-right: 20px;
background-image: url(../images/ourlocation.jpg);
background-repeat: no-repeat;
background-position: 0 -.2em;
}
Run Code Online (Sandbox Code Playgroud)
看一下下面的例子:
ul#footernav li {
display:inline;
}
ul#footernav li a{
display:block;
width:155px;
text-indent:-9999px;
}
ul#footernav li.footerlocation a{
height:30px ;
background: url('images/image.jpg') bottom left no-repeat;
}
ul#footernav li.footerlocation a:hover{
height:30px ;
background: url(images/image.jpg) top left no-repeat;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
65789 次 |
| 最近记录: |