Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 我想为这个径向渐变和div生成边界_Javascript_Jquery_Html_Css - Fatal编程技术网

Javascript 我想为这个径向渐变和div生成边界

Javascript 我想为这个径向渐变和div生成边界,javascript,jquery,html,css,Javascript,Jquery,Html,Css,这是我的密码 div{ 高度:150像素; 边缘:5米2米; 背景:径向渐变(顶部中心的圆圈,透明,透明70px,黑色70px,黑色); 边界半径:8p######x; 位置:相对位置; } .圆圈{ 宽度:120px; 高度:120px; 背景:红色; 边界半径:50%; 位置:绝对位置; 排名:0; 左:50%; 转换:翻译(-50%,-50%); } 身体{ 背景图片:url(http://www.fillmurray.com/1000/1000); 背景尺寸:封面; } 你的意思是这样

这是我的密码

div{
高度:150像素;
边缘:5米2米;
背景:径向渐变(顶部中心的圆圈,透明,透明70px,黑色70px,黑色);
边界半径:8p######x;
位置:相对位置;
}
.圆圈{
宽度:120px;
高度:120px;
背景:红色;
边界半径:50%;
位置:绝对位置;
排名:0;
左:50%;
转换:翻译(-50%,-50%);
}
身体{
背景图片:url(http://www.fillmurray.com/1000/1000);
背景尺寸:封面;
}

你的意思是这样的吗

div{
高度:150像素;
边缘:5米2米;
背景:径向渐变(顶部中心的圆圈,透明,绿色70px,黑色70px,黑色);
边界半径:8p######x;
位置:相对位置;
边框:10px纯绿;
}
.圆圈{
宽度:120px;
高度:120px;
背景:红色;
边界半径:50%;
位置:绝对位置;
排名:0;
左:50%;
转换:翻译(-50%,-50%);
}
身体{
背景图片:url(http://www.fillmurray.com/1000/1000);
背景尺寸:封面;
}


你能澄清一下你想做什么吗?从代码中的注释判断,OP试图在黑色的包含div元素上获得一个边框。边框需要仅应用于外部div,但也有一个围绕“cut”(包含红色跨距)的边框,但不能与红色跨距重叠。