css3實現(xiàn)多背景展示效果通過css3定位多張背景

字號:


    代碼如下:
    <!doctype html>
    <html>
    <head>
    <meta http-equiv=content-type content=text/html; charset=utf-8 />
    <title>css3實現(xiàn)多背景展示</title>
    </head>
    <body>
    <div style=height:5400px;>
    <div style=background:url(http://pic02.newdu.com/uploads/202504/02/m_fff653c539e10000015c06f796e04021.jpg) no-repeat center center fixed;height:880px;margin-bottom:10px;></div>
     <div style=background:url(http://pic02.newdu.com/uploads/202504/02/m_dfff53c539e40000015c06f6ff044021.jpg) no-repeat center center fixed;height:880px;margin-bottom:10px;></div>
    <div style=background:url(http://pic02.newdu.com/uploads/202504/02/m_0b3d53ce00b100000174d030a1fd4021.jpg) no-repeat center center fixed;height:880px;margin-bottom:10px;></div>
    <div style=background:url(http://pic02.newdu.com/uploads/202504/02/m_c24d53ce007300000174d0debb3e4022.jpg) no-repeat center center fixed;height:880px;margin-bottom:10px;></div>
    <div style=background:url(http://pic02.newdu.com/uploads/202504/02/m_606453ce006500000174d00396f94022.jpg) no-repeat center center fixed;height:880px;margin-bottom:10px;></div>
     <div style=background:url(http://pic02.newdu.com/uploads/202504/02/m_71fe53ce005e00000174d0000ac04022.jpg) no-repeat center center fixed;height:880px;margin-bottom:10px;></div>
    </div>
    </body>
    </html>
    通過css3定位多張背景并且使用固定屬性。