2016-08-14 33 views
1

這是一個嵌入框陰影與單邊大邊界半徑鉻問題?這是一個嵌入式盒子陰影與單邊大邊界半徑鉻問題?

我想知道哪個瀏覽器是正確的?


enter image description here

火狐
enter image description here

<div style=" 
 
    border-top-left-radius: 100%; 
 
    box-shadow: inset 0px 0px 0 20px red; 
 
    background-color: #ccc; 
 
    width: 200px; 
 
    height: 100px; 
 
"></div>

+0

[箱陰影和邊界半徑的bug在Chrome(可能的重複http://stackoverflow.com/questions/2937731/box-shadow-and-border-radius-bug-in-chrome) –

+0

@ madalina-taina不,他們是不同的問題。這個問題在五年前已經確定。 ref:http://www.paulirish.com/2011/chrome-inset-box-shadow-bug-fixed/ – Rplus

回答

0

這似乎是一個Firefox的問題。對於這個例子,我建議你適應CSS,以便你可以使用邊框。

div{ 
 
border-top-left-radius: 100%; 
 
background-color: #ccc; 
 
width: 160px; 
 
height: 60px; 
 
border:20px solid red; 
 
} 
 
p{ 
 
border-top-left-radius: 100%; 
 
box-shadow: inset 0px 0px 0 20px red; 
 
background-color: #ccc; 
 
width: 200px; 
 
height: 100px; 
 
}
<p></p> 
 
<div></div>

更新:我爲您在Safari和Opera了。這是它的外觀:

enter image description here - > Safari瀏覽器

enter image description here - >歌劇院

+0

Opera只是另一個Chrome(Blink)瀏覽器, 和Safari的風格太奇怪了...... – Rplus