html 无效的标记,html - 背景 - HTML标记上的位置无效 - 堆栈内存溢出

我正在关注webdesign tutsplus的一个教程,最终页面: http ://webdesigntutsplus.s3.amazonaws.com/126_RibbonNavTutorial/code/demo_css_ribbon.html

我已经完成了一切,但是一个问题是html样式,你可以看到我已经包括高度:100%,但在原始教程中没有那条线,如果我删除那条线然后它崩溃了,但在原始教程中它是完美,为什么呢?

而且现在我已经完成了高度:100%然后你可以在底部滚动并且可以看到底部留有一个边距,我希望该图像粘在页面的最底部。

请下载图片以便您可以尝试此代码,以下是图片链接:

代码:

html{

background:#77d5fb url('bottom_bg.jpg') bottom center no-repeat;

height:100%;

}

body{

background:transparent url('top_bg.png') top center no-repeat;

height:100%;

width:100%;

margin:0 0;

}

#container{

width:900px;

margin:0 auto;

}

#navBar{

height:62px;

background-color:#e5592e;

margin:3em 0;

position:relative;

-webkit-box-shadow:0px 0px 4px rgba(0,0,0,0.55);

box-shadow:0px 0px 4px rgba(0,0,0,0.55);

-moz-box-shadow:0px 0px 4px rgba(0,0,0,0.55);

-o-box-shadow:0px 0px 4px rgba(0,0,0,0.55);

border-radius:3px;

z-index:500;

}

#menu li{

list-style-type:none;

display:block;

float:left;

margin:1em 0.8em;

}

#menu li a{

display:block;

text-decoration:none;

color:#F0F0F0;

font-size:1.6em;

margin:0;

line-height:28px;

text-shadow:0 2px 1px rgba(0, 0,0, 0.5);

}

#menu li a:hover{

/*transition:margin-top 0.3s;

-webkit-transition:margin-top 0.3s;*/

margin-top:2px;

}

#lt-corner{

width:0px;

height:0px;

border:50px solid;

border-color:#d9542b transparent transparent;

position:relative;

float:left;

top:1px;

left:-50px;

}

#lb-corner{

border:50px solid;

border-color:transparent transparent #d9542b;

width:0px;

height:0px;

position:relative;

float:left;

top:-40px;

left:-150px;

}

#rt-corner{

width:0px;

height:0px;

border:50px solid;

border-color:#d9542b transparent transparent;

position:relative;

float:right;

top:-107px;

right:-45px;

}

#rb-corner{

border:50px solid;

border-color:transparent transparent #d9542b;

width:0px;

height:0px;

position:relative;

float:right;

top:-149px;

right:-145px;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值