我想漸變所有的HTML文檔,並在BODY標籤的中心我需要另一個背景爲中心。HTML和BODY不同的背景
編輯,看看它有多少失敗嘗試一下:
http://xn--wiadomesny-37b.pl/bg
此圖片解釋它:
如果我把在CSS它失敗了,只有1個背景甚至顯示,如果下面應顯示repeat-y背景:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
html {
background-color: #ffeacd;
background-image: url(bg.png);
background-repeat: repeat-x;
}
body {
background-image: url(bg_overlay.png);
background-repeat: no-repeat;
background-position: center;
}
.content {
width:1020px;
padding: 0px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
</style>
</head>
<body>
<div class="content">
<p>This content is closed in 1020px wide DIV, as to merge in most displays. </p>
<p>Rest around is an background seen or unseen depends on users screen size. </p>
<p>Me got 24'' so its obvious that I will see all backgrounds and even gradients as
blank space fillers</p>
<p>
<h1>See how much it fails in various browsers:</h1>
<ul>
<li><a href="chrome.png">Chrome</a></li>
<li><a href="ff.png">Firefox</a></li>
<li><a href="ie.png">IE</a></li>
</ul>
</p>
)</div>
</body>
</html>
需要看你的實際代碼。 – BoltClock
提供了現場示例的代碼,現在你可以看到它失敗了多少 –