CSSã§ä¸ä¸å·¦å³ã«ç°ãªãé«ãã®èæ¯ãè¨ç½®ããæ¹æ³
ã ãã¶åã«
左右で色が異なる背景画像を設定するスタイルシート
ãã³ãªã¹ã§ç´¹ä»ããã¦ãããã©ã
ä¸ä¸å·¦å³ã«ç°ãªãé«ãã®èæ¯ãè¨ç½®ããæ¹æ³ãèãã¦ã¿ãã
IE6ãIE7ãFxãSafariãoperaãChromeã§è¡¨ç¤ºã§ããã
html
<div id="back01"></div> <div id="back02"></div> <div id="box"> contents </div> <div id="back03"></div> <div id="back04"></div>
body{ margin:0px; } #back01 { height:10px; right:50%; font-size:0; background:red; position:relative; z-index:1; } #back02 { height:20px; width:50%; right:-50%; top:-10px; font-size:0; background:green; position:relative; z-index:1; } #back03 { height:30px; right:50%; bottom:-40px; font-size:0; background:yellow; position:relative; z-index:1; } #back04 { height:40px; right:-50%; width:50%; background:blue; position:relative; z-index:1; } #box{ width:800px; height:1000px; background:#333; margin:-30px auto -70px auto; position:relative; z-index:2; }