網頁背景要往外延伸,但左右兩邊延伸的圖案不同,可以利用CSS的DIV標籤來達成效果。
<html>
<body style="background-color: red; margin: 0px; height: 100%;"> <div style="position: fixed; top: 0; left: 0; width: 50%; height: 400%; background-color: yellow; z-index: 1;"></div> <div style="position: absolute; top: 0; left: 0; z-index: 2; width: 100%;"></div> </body>