2010-06-02 29 views
1

我知道如何使用圖像生成圓角。但是,請看看鏈接: -我如何在中間創建這些邊界?

http://roundedbox.andreas-kalt.de/

圓角的四角都是圖片,但我的問題是如何在中間的邊框做了什麼?那些圍繞整個div的綠色邊框。

本教程給出的卻是德國:(。此外,我不希望使用CSS3像-webkit-邊界半徑等,因爲它們還沒有在IE中支持提前:)

謝謝

回答

1

整個事情與4張背景圖片 這裏做的是它們用於圖像邊境的CSS

roundbox-tr { 
    margin:15px auto; 
    padding:0; 
    background:url("roundbox_tr.gif") no-repeat right top; 
    width: 90%; 
} 

/* top-left corner and left side */ 
.roundbox-tl { 
    margin:0; 
    padding:0; 
    background: url("roundbox_tl.gif") no-repeat left top; 
} 

/* bottom-right corner and bottom side */ 
.roundbox-br { 
    margin:0; 
    padding:0; 
    background: url("roundbox_br.gif") no-repeat right bottom; 
} 

/* bottom-left corner */ 
.roundbox-bl { 
    margin:0; 
    padding:0; 
    background: url("roundbox_bl.gif") no-repeat left bottom; 
} 
+0

你的意思是整個事情在一個大的形象?但是,這是一個非常糟糕的做法。不是嗎?而且,它受到寬度和高度的限制。如果我有不同的寬度和/或高度與url中顯示的寬度和/或高度?設計一個不同的圖像?那不好嗎? – TCM 2010-06-02 04:01:31

+0

耶不是圓角的好主意。你可以試試NIFTY Corners。谷歌它你會發現一個很好的例子。 – 2010-06-02 04:07:44

+0

嗨,約翰,我知道他們完成了4個圖像(四角)。但我的問題是,你發佈的CSS是四個角落。中間的邊界呢?頂部中間邊框。如果我還不清楚。請告訴我。 – TCM 2010-06-02 04:07:57

0

。在Mozilla中使用firebug插件並檢查。

相關問題