圖片資源和更多設計方式可以在下載圓角設計
5背景可變寬圓角框
<!DOCTYPE html><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>5背景可變寬圓角框</title> <style> body{ background: #ffff99; font: 12px/1.5 arial; } .rounded{ width: 50%; background: url(images/1103images/left-top.gif) top left no-repeat; } .rounded h3{ padding: 20px 20px 10px; margin: 0; background: url(images/1103images/right-top.gif) top right no-repeat; } .rounded .main{ padding: 10px 20px; margin: -2em 0 0 0; background: url(images/1103images/right.gif) top right repeat-y; } .rounded .footer{ background: url(images/1103images/left-bottom.gif) bottom left no-repeat; } .rounded .footer p{ display: block; padding: 10px 10px 20px; margin: -2em 0 0 0; background: url(images/1103images/right-bottom.gif) bottom right no-repeat; } </style> </head> <body> <div class="rounded"> <h3>Article header</h3> <div class="main"> <p> 這是一行文本,這裡作為範例,顯示在圓角框。<br /> 這是一行文本,這裡作為範例,顯示在圓角框。 </p> <p> 這是一行文本,這裡作為範例,顯示在圓角框。<br /> 這是一行文本,這裡作為範例,顯示在圓角框。 </p> </div> <div class="footer"> <p> 這是著作權資訊文字。 </p> </div> </div> </body></html>
可變圓角框的設計(兩張圖片)
<!DOCTYPE html><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>可變圓角框的設計(兩張圖片)</title> <style type="text/css" media="screen"> #rounded{ background:#ffff00 url('images/top_1.gif') no-repeat; font: 12px/1.6 arial; width: 20%; padding: 0; margin:0 auto; } #rounded h3 { background: url('images/right-top.gif') no-repeat right top; padding: 20px 20px 0; font-size: 170%; color: #000; margin: 0; } #rounded p { margin: 0; text-indent:2em; background: url('images/bottom_1.gif') no-repeat left bottom; } #rounded span{ padding: 10px 20px 18px; color: #1B220F; display:block; background:url('images/right-bottom.gif') no-repeat right bottom; } </style> </head> <body> <div id="rounded"> <h3>Unfixed Round</h3> <p> <span>這是一個不固定寬度的圓角框,由於是寬度不固定,因此製作起來複雜一些。這個圓角框的上下隨著內容增多可以自由伸展,圓角不會被破壞。此外,設定為不同的寬度,也同樣適用。</span></p> </div> </body></html>