2011-12-02 74 views
1

我有以下代碼: HTML:邊境時,有一個邊界半徑在Chrome設置15

<div id="login" class="transparent-div login_leaf_class"> 

<input class="pointer login_fields_button" id="submit_button" type="submit" title="SUBMIT" value="SUBMIT"/> 
</div> 

CSS:

.login_leaf_class 
{ 
    border:solid #000 !important; 
    border-top-left-radius:70% 60% ; 
    border-bottom-right-radius:70% 60%; 
    -moz-border-top-left-radius:70% 50%; 
    -moz-border-bottom-right-radius:70% 50%; 
} 
div#login 
{ 
    position:relative; 
    padding:10px; 
    overflow:hidden; 
    margin-top:10%; 
    margin-right:5%; 
    color:#0000; 
    float:right; 
    width:300px; 
    height:200px; 
    font-weight:900; 
    background:#FFB3FF; 
    background:rgba(255,179,255,0.8); 
} 
.login_fields_button 
{ 
    float:right; 
    display:inline; 
    background:#003300; 
    color:#FFF; 
    font-weight:900; 
    padding:4px; 
    width:100px; 
    height:50px; 
    border-radius:0 !important; 
    border-top-left-radius:99.9% 100% !important; 
    border-bottom-right-radius:99.9% 100% !important; 
    -moz-border-top-left-radius:99.9% 100% !important; 
    -moz-border-bottom-right-radius:99.9% 100% !important; 
    border:solid #fff !important; 
} 

的問題是,邊框看起來是來到FireFox。一切正常,只要我也有chrome14,但最近當我更新到鉻15時,邊框只出現在兩個角落。 請參閱以下屏幕截圖: This is normal scenarioThis is how it looks in chrome 15 我該怎麼做?這是一個錯誤嗎? http://jsfiddle.net/uMYfp/1/

回答

1

如果您給它一個0123px4px或更多,它的工作原理。

Demo

而且,你不需要這些!important S,這是一個不好的做法。

+0

它是一個需要這個「重要」的大代碼的一個片段,除此之外,我很想知道爲什麼先前版本的chrome中出現的邊界一​​下子消失了,我不得不增加border-半徑?? – sasidhar

+0

是的,看起來像一個錯誤。它不是我不明白的特殊性,只是我太懶惰了,哈哈......我會改變這一點。非常感謝。 – sasidhar