【问题标题】:Border not appearing when there is a border radius set in chrome 15在 chrome 15 中设置了边框半径时,边框不会出现
【发布时间】:2011-12-02 14:05:44
【问题描述】:

我有以下代码: HTML:

<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,一切正常,但最近当我更新到 chrome 15 时,边框只出现在 2 个角。 请参阅以下屏幕截图: 我应该在这里做什么??这是bug吗?? http://jsfiddle.net/uMYfp/1/

【问题讨论】:

    标签: html google-chrome css rounded-corners


    【解决方案1】:

    如果你给它一个 4px 或更大的border-radius,它就可以工作。

    Demo

    另外,你不需要那些!importants,这是一种不好的做法。

    【讨论】:

    • 它是来自需要此!important 的大型代码的片段,除此之外,我很想知道为什么以前版本的 chrome 中出现的边框会立即消失,我必须增加边界半径??
    • 是的,看起来像一个错误。不是我不懂具体,只是我太懒了,哈哈……我会改变的。非常感谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-14
    • 1970-01-01
    • 1970-01-01
    • 2018-01-02
    • 1970-01-01
    • 2016-07-08
    相关资源
    最近更新 更多