<p class="sycode"> <br> </p> <br> <title>CSS制作斜角上有背景图片的Div层</title> <br> <style> <br /> .window{ <br /> width:400px; <br /> border:1px solid #B6B6C0; <br /> position:relative; <br /> } <br /> .title{ <br /> background:#F0F0F2; <br /> height:30px; <br /> border-bottom:1px solid #CBCFD2; <br /> font-size:14px; <br /> line-height:30px; <br /> text-indent:1em; <br /> } <br /> .body{ <br /> height:100px; <br /> font-size:12px; <br /> padding:8px; <br /> } <br /> .flag{ <br /> background:url(x.jpg) no-repeat 100% 0; <br /> height:55px; <br /> width:55px; <br /> position:absolute; <br /> right:0; <br /> top:0; <br /> } <br /> </style> <br> <br> <br> <div class="window"> <br> <div class="flag"></div> <br> <div class="title">欢迎光临!</div> <br> <div class="body">显示内容显示内容显示内容显示内容显示内容显示内容。</div> <br> </div> <br> <div><a href="http://www.999jiujiu.com/"> http://www.999jiujiu.com/</a></div> <br> <br> <script> <br /> </script> <br>