Google chrome 透明圆形镀铬边框

Google chrome 透明圆形镀铬边框,google-chrome,border,transparent,Google Chrome,Border,Transparent,我必须使div的圆形边框透明。这是代码 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Test</title> <style> body { background-color: green; } #demobt

我必须使div的圆形边框透明。这是代码

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Test</title>
    <style>

    body
    {
        background-color: green;
    }

    #demobtn
    {
        height: 10%;
        width: 18%;
        left: 50%;
        top: 50%;
        border: solid;
        border-width: 4px;
        border-color: rgba(0, 0, 0, 0.5);
        -webkit-border-radius: 18% / 50%;
        border-radius: 18% / 50%;
        background-color: white;
        -webkit-background-clip: content;
        background-clip: content-box;
        margin: 0.25%;
        padding: 0%;
        position: relative;
    }

    </style>
</head>
<body>
    <div id="demoBtn"></div>
</body>

试验
身体
{
背景颜色:绿色;
}
#demobtn
{
身高:10%;
宽度:18%;
左:50%;
最高:50%;
边框:实心;
边框宽度:4px;
边框颜色:rgba(0,0,0,0.5);
-webkit边界半径:18%/50%;
边界半径:18%/50%;
背景色:白色;
-webkit背景剪辑:内容;
背景剪辑:内容框;
利润率:0.25%;
填充:0%;
位置:相对位置;
}

它在Firefox中运行得非常完美,而Chrome无法正确管理角落的透明度。结果是:


我怎样才能解决这个问题?

Hrmn。我不太确定。但是你可以做一个双div,模仿同样的东西

# HTML
<div id="lightbox-border">
    <div id="lightbox">
        Content here.
    </div>
</div>​

# CSS
body {
    margin:50px;
    background-color:green;
}

#lightbox-border {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px; /* This is somewhat the border */
    border-radius: 15px;
}

#lightbox {
    background-color: white;

    border-radius: 10px;
    padding: 15px;
}
​
#HTML
内容在这里。
​
#CSS
身体{
利润率:50像素;
背景颜色:绿色;
}
#灯箱边框{
背景:rgba(0,0,0,0.3);
填充:20px;/*这有点像边界*/
边界半径:15px;
}
#灯箱{
背景色:白色;
边界半径:10px;
填充:15px;
}
​
我在这里拉了把小提琴