我有以下標記。應用底部框陰影在左側和右側底部留下一些陰影空間
<!DOCTYPE html>
<html lang="en">
<body>
<div id="wrapper">
<div id="container">
<div id="navigation">
</div>
</div>
</div>
</body>
</html>
用下面的CSS
body
{
width: 100%;
background-color: #E4E4E4;
font-size: 16px;
line-height: 19px;
font-family: Cambria, Georgia, serif;
}
div#wrapper
{
width: 960px;
margin: 0 auto;
background-image: url("nav_bg.png");
background-repeat: no-repeat;
background-position: center 219px;
}
div#container
{
width: 920px;
background-color: #F9EADE;
box-shadow: 0 0 15px 5px rgb(31, 73, 125);
margin: 0 auto;
}
div#navigation
{
height: 50px;
margin-bottom: 200px;
background-color: rgb(31, 73, 125);
box-shadow: 0px 10px 4px -4px rgba(0, 0, 0, 0.8);
}
的nav_bg.png是這個
而且我得到的底部白色無陰影的空間左右
如果我更改代碼以這種
div#navigation
{
height: 50px;
margin-bottom: 200px;
background-color: rgb(31, 73, 125);
box-shadow: 0px 10px 4px 0px rgba(0, 0, 0, 0.8);
}
我得到的左,右兩側,因爲這額外的陰影。
,如果我從股利#導航去除背景顏色和邊框陰影如下。
div#navigation
{
height: 50px;
margin-bottom: 200px;
}
我得到這個
對不起,我之前messesd了問題,真正的壞。
請分享一些代碼... – Usman 2012-08-17 07:22:53
@Usman:編輯和包含的代碼。 – Jawad 2012-08-17 07:54:20
你已經對PNG有影子了,爲什麼要用CSS添加更多內容?使用一個或另一個,否則你一定會遇到問題。 – Kyle 2012-08-17 07:54:24