我需要做的DINAMIC圓盒,(DINAMIC高度和DINAMIC寬度) 包下來,我嘗試使用在波紋管的鏈接代碼報價:文字圓角盒
http://home.tiscali.nl/developerscorner/liquidcorners/liquidcorners.htm
,但我需要它也有圖像的中間左側和右側(我不能簡單地使用背景和邊框作爲提供的代碼, 我嘗試修改代碼,並且框看起來不錯,
但是當我在其中輸入文本時,文中換行。
有什麼想法?
HTML代碼
<div class="RoundCrnr">
<div class="TopLeft"></div>
<div class="TopRight"></div>
<div class="inside">
<div class="MiddleLeft">
<div>text</div>
<div>text</div>
<div>text</div>
<div>text</div>
<div>text</div>
<div>text</div>
<div>text</div>
<div>text</div>
</div>
<div class="MiddleRight"></div>
</div>
<div class="BottomLeft"></div>
<div class="BottomRight"></div>
</div>
CSS代碼
.RoundCrnr {
width:590px;
float:right;
}
.TopLeft {
background-image: url("/Content/Images/Top_left.png");
height: 34px;
font-size: 2px;
margin-right: 34px;
}
.TopRight {
float: right;
margin-top: -34px;
background-image: url("/Content/Images/box_top_right.png");
height:34px;
width: 34px;
font-size: 2px;
}
.gap-saver {
height: 1px;
margin: 0 0 -1px 0;
padding: 0;
font-size: 1px; /* to correct IE */
}
.MiddleLeft {
background-image: url("/Content/Images/Middle_left.png");
height: 7px;
margin-right: 20px;
}
.MiddleRight {
float: right;
margin-top: -7px;
background-image: url("/Content/Images/box_right.png");
height:7px;
width: 20px;
}
.BottomLeft {
background-image: url("/Content/Images/Bottom_left.png");
height: 33px;
font-size: 2px;
margin-right: 33px;
}
.BottomRight {
background-image: url("/Content/Images/box_bottom_right.png");
background-position: 100% 0;
background-repeat: no-repeat;
height: 33px;
font-size: 2px;
margin-top: -33px;
}
.inside {
}
非常感謝!
可能此鏈接有幫助。 [點擊這裏](http://www.hollen-b.com/tutorials/css_rounded_corners /) – Ankit 2011-03-02 10:24:06