html怎么给让按钮横着排版,css如何排版,如以下代码,我就是想把导航按钮与背景对齐呀,但我? 爱问知识人...

html部分:

<

html部分:

CSS部分:

.head{

padding-top:0px;

background:url(../images/IndexNav.png) center top no-repeat;

height:74px;

width:100%;}

.nav{

width:950px;

height:74px;

overflow:hidden;

margin:0 auto;}

.nav ul{

list-style-type:none;

height:74px;

}

.nav li{

margin-right:10px;

padding-right:-2px;

float:right;}

.nav1 a{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -570px -10px;

}

.nav1 a:link{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -570px -10px;}

.nav1 a:hover{

background:url(../images/IndexNavBtn_.png) no-repeat -570px -10px;}

.nav2 a{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -460px -10px;}

.nav2 a:link{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -460px -10px;}

.nav2 a:hover{

background:url(../images/IndexNavBtn_.png) no-repeat -460px -10px;}

.nav3 a{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -350px -10px;}

.nav3 a:link{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -350px -10px;}

.nav3 a:hover{

background:url(../images/IndexNavBtn_.png) no-repeat -350px -10px;}

.nav4 a{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -240px -10px;}

.nav4 a:link{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -240px -10px;}

.nav4 a:hover{

background:url(../images/IndexNavBtn_.png) no-repeat -240px -10px;}

.nav5 a{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -130px -10px;}

.nav5 a:link{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -130px -10px;}

.nav5 a:hover{

background:url(../images/IndexNavBtn_.png) no-repeat -130px -10px;}

.nav6 a{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -20px -10px;}

.nav6 a:link{

width:105px;

height:74px;

display:block;

background:url(../images/IndexNavBtn.png) no-repeat -20px -10px;}

.nav6 a:hover{

background:url(../images/IndexNavBtn_.png) no-repeat -20px -10px;}

效果如图:

展开

全部

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值