Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.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
制作一个带渐变和不带渐变的纯css圆_Css - Fatal编程技术网

制作一个带渐变和不带渐变的纯css圆

制作一个带渐变和不带渐变的纯css圆,css,Css,我无法用下面的代码创建一个圆。你能解释一下CSS圈是如何工作的吗 .circle { width: 200px; height: 200px; background: #4679BD; } 无梯度 .circle { width: 200px; height: 200px; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%;

我无法用下面的代码创建一个圆。你能解释一下CSS圈是如何工作的吗

.circle {
    width: 200px;
    height: 200px;
    background: #4679BD;
}

无梯度

.circle {
    width: 200px;
    height: 200px;
    -moz-border-radius: 50%; 
    -webkit-border-radius: 50%; 
    border-radius: 50%;
    background: #4679BD;
}

在CSS中,可以使用边界半径 对于纯圆形,可以将该值设置为50%;对于具有圆角的形状,可以将该值设置为px

您的代码应该如下所示:

.circle {
        width: 200px;
        height: 200px;
        border-radius: 50%;
    }
可能重复的