CSS样式网页导航条

1、图片素材:


2、实现代码:

</pre><p><pre name="code" class="html"><!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>导航栏</title>
		<style type="text/css">
			li {
				list-style: none;
				float: left;
				font-size: 14px;
				text-align: center;
			}
			
			a:link,
			a:visited {
				display: block;
				width: 84px;
				font-weight: bold;
				color: black;
				text-align: center;
				text-decoration: none;
			}
			
			a:hover,a:active{
				background:url(img/nav_bg.gif);
				width: 84px;
				height: 26px;
				position: relative;
				line-height: 28px;
				text-align: center;
				font-size: 14px;
				letter-spacing: 3px;/*字符间距*/
				margin-top: -7px;
				/*z-index: -1;*/
			}
			
			.bg {
				margin-left: 100px;
				color: #F8A046;
				font-size: 18px;
				font-weight: bold;
				background-image: url(img/h_bg.jpg);
				background-repeat: no-repeat;
				width: 1200px;
				height: 150px;
				white-space: nowrap;
				background-position: -20px 1px;
			}
			
			ul {
				padding-top: 104px;
				padding-left: 2px;
			}
		</style>

	</head>

	<body>
		<div class="bg">
			<ul>
				<li><a href="">首  页</a></li>
				<li><a href="">家用电器</a></li>
				<li><a href="">手机数码</a></li>
				<li><a href="">日用百货</a></li>
				<li><a href="">书  籍</li>
				<li><a href="">帮助中心</li>
				<li><a href="">免费开店</li>
				<li><a href="">全球资讯</li>
				
			</ul>
		</div>
	</body>
</html>

3、实现效果:



  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值