html - 边框半径在 Opera 中渲染得很奇怪(在 chrome、firefox 中很好)

标签 html opera css

http://jsfiddle.net/eE4Y2/2/

我正在尝试使用 css 为 div 创建圆 Angular 折叠 Angular 错觉。

我不明白为什么这个相当简单的 html/css 在 Opera (v.12.10) 中渲染得很奇怪,但在 chrome 和 firefox 中看起来很好。当我对 div 应用边框半径时,边框内会出现一个奇怪的缺口,仅适用于 Opera。请参阅上面的 jsfiddle 来查看示例。

我很想听到修复方案,或者至少能解释一下 Opera 在这种情况下发生的情况。

<body>
    <div class="example"></div>
</body>



body 
{
   background-color: gray;
   padding: 50px;        
}

div.example
{
    border-bottom-left-radius: 10px;
    border-color: transparent transparent white white;
    border-style: solid;
    border-width: 30px;
    display: block;
    width: 0;
    height: 0;   
}

最佳答案

这似乎是歌剧错误。因此,您可以通过在故障之前放置另一个 div 来手动修复它 http://jsfiddle.net/aN4XP/

<div class="example">
    <div class="operaFix"></div>
</div>

这里是附加的 CSS:

div.operaFix
{
    border-bottom-left-radius: 10px; 
    border-color: white;
    border-style: solid;
    border-width:10px;
    display:block;
    margin-left:-30px;
    margin-top:10px;
    width: 0;
    height: 0;   
}

其他浏览器不应受到此影响。

关于html - 边框半径在 Opera 中渲染得很奇怪(在 chrome、firefox 中很好),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13304688/

相关文章:

javascript - 有没有办法禁用传单图层控件中的单选按钮?

html - 如何使用全局站点标记(gtag.js)事件点击指向目标的链接?

HTML元素百分比高度问题

javascript - 使用 confirm() 表单打开新标签页或窗口

html - 为什么 Opera 将我的网页解析为 XML?

javascript - HTML/CSS : How to fade the left and right edges of a div?

javascript - 如何停止 setInterval()?

javascript - 去除 HTML 标签,但保留内容(javascript/jquery)

html - Opera 浏览器 :hover weirdness

html - 为什么我的水平照片随屏幕尺寸缩放,而我的垂直照片却没有?