解决方案 »

  1.   

    补充下 屏幕不够宽的话   banner的内容不需要显示完  主题内容两侧背景更不需要显示可以做到吗?
      

  2.   

    banner图片作为div的背景<style>
    .banner{    background-image: url(http://godominicanrepublic.cn/images/home-pic1.jpg);
        background-position: center top;/*-------这里-----*/
        background-repeat: no-repeat;
        display: block;
        height: 800px;
        left: 0;
        margin: 0;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: -1;}
    </style>
    <div class="banner"></div>
      

  3.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head>
    <body id="b1" onload="f();">
    <script>
    function f()
    {
     document.documentElement.scrollLeft=document.documentElement.scrollWidth;
     var j=document.documentElement.scrollLeft;
     var i=document.documentElement.scrollWidth-j;
     document.documentElement.scrollLeft=document.documentElement.scrollWidth/2-i/2;
     index=document.documentElement.scrollLeft;
     }
     document.body.onresize=f;
    </script><div style="border:1px blue solid; width:1200px; height:40px; margin:auto; text-align:center">dfdfdf</div></body>
    </html>
    以上代码经过IE浏览器的调试,希望能帮到你
      

  4.   

    斑竹大人display: block;
    left: 0;
    margin: 0;
    position: absolute;
    top: 0;这几个为什么需要呢?banner只要100%宽度背景居中就满足需求了吧