我已经到处寻找答案,我正在尝试使用div和css编码设计。图像的顶部有一个渐变,从左到右是不同的颜色。我发现的问题是我只能做到一半,最后我终于让图像居中了,但其中一部分被隐藏在背景下面。
(http://pretty-senshi.com/final-final.html) <-- 目前为止设计的样本 http://pretty-senshi.com/original.png <-- 原始设计 http://pretty-senshi.com/gradient.png <-- 需要在X轴上重复的背景渐变。
(http://pretty-senshi.com/final-final.html) <-- 目前为止设计的样本 http://pretty-senshi.com/original.png <-- 原始设计 http://pretty-senshi.com/gradient.png <-- 需要在X轴上重复的背景渐变。
<html> <LINK href="style.css" type=text/css rel=stylesheet> </head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="container"><div id="rightHalf">
</div><center><img src="images/Final-Final_02.png" id="picture"></center>
<div id="header2">
</div>
</div>
</div></div>
这段代码是CSS:
@charset "UTF-8";
/* CSS Document */
body {background: url(images/final-final_01.png);
background-repeat:repeat-x;}
div#container {
width:100%;}
picture {z-index: 999;}
#rightHalf {
background: url(images/final-final_03.png);
background-repeat:repeat-x;
width: 50%;
position: absolute;
right: 0px;
height: 100%;
z-index: 1;
}