<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>CSS滑动门技术</title>
<style type="text/css">
body,ul,li{ padding:0; margin:0 ; list-style:none;}
.all{
width:1200px;
margin:20px auto;
height:56px;
line-height:56px;
}
.all li{ float:left; }
.all a, span{
display:inline-block;
height:56px;
float:left; /*设置li中的3个盒子左浮动*/
}
.one{
width:22px;
background:url(images/left.png); /*定义左圆角背景图像*/
}
.two{
width:22px;
background:url(images/right.png); /*定义右圆角背景图像*/
}
.all a
{
color:yellow;
background:url(images/middle.png) repeat-x; /*定义中间的渐变背景*/
text-shadow:3px -3px 5px red;
}
.all a:hover
{
color:white;
background:url(images/middle.png) repeat-x; /*定义中间的渐变背景*/
}
</style>
</head>
<body>
<ul class="all">
<li>
<span class="one"></span><a href="#">首页</a><span class="two"></span>
</li>
<li>
<span class="one"></span><a href="#">公司产品</a><span class="two"></span>
</li>
<li>
<span class="one"></span><a href="#">就业指导信息</a><span class="two"></span>
</li>
<li>
<span class="one"></span><a href="#">留言簿</a><span class="two"></span>
</li>
<li>
<span class="one"></span><a href="#">添加友情链接</a><span class="two"></span>
</li>
</ul>
</body>
</html>
CSS滑动门技术
最新推荐文章于 2023-04-17 22:18:39 发布