一般在页面的导航栏部分使用滑动门技术,此做法的优点在于不管里面的文字有多少,都可以实现自由伸缩,不影响外观。其做法如下:
在css里面设置的样式:
a {
display: inline-block;
height: 33px;
background: url(images/to.png) no-repeat;
padding-left: 15px;
line-height: 33px;
}
a span {
display: inline-block;
height: 33px;
padding-right: 15px;
background: url(images/to.png) right top no-repeat;
html结构中的写法:
<a href="#">
<span>文字</span>
</a>
本文介绍了一种在页面导航栏中使用的滑动门技术,通过CSS样式实现文字内容的自由伸缩,无论文字多少,都能保持良好的外观效果。具体实现包括设置背景图片、高度、内边距等属性。
7590

被折叠的 条评论
为什么被折叠?



