Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.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
Html 彩色圆圈背景不显示在数字后面_Html_Css - Fatal编程技术网

Html 彩色圆圈背景不显示在数字后面

Html 彩色圆圈背景不显示在数字后面,html,css,Html,Css,我想在1号后面画一个蓝色的圆圈。数字正在显示,但由于某种原因背景色没有显示 以下是我的JSFIDLE: 这是我的密码: <div class="circle rtecenter"><span class="number">1</span></div> 你把类名拼错了,就是这样: .circle而不是。circle gray 我不知道这是一个玩笑还是一个相关问题 您是否意识到在您的div中您引用的是一个不存在的类 你的CSS中没有一个类“.cir

我想在1号后面画一个蓝色的圆圈。数字正在显示,但由于某种原因背景色没有显示

以下是我的JSFIDLE:

这是我的密码:

<div class="circle rtecenter"><span class="number">1</span></div>

你把类名拼错了,就是这样:

.circle
而不是
。circle gray


我不知道这是一个玩笑还是一个相关问题

您是否意识到在您的div中您引用的是一个不存在的类


你的CSS中没有一个类“.circle”,这就是为什么它不起作用。

我是在开玩笑……我总是喜欢在我的答案中给出解释,而不仅仅是发布解决方案。我总是很乐意帮忙。但不管怎样,你还是把另一个答案投了赞成票。祝你圣诞快乐
.circle-gray {
    border-radius: 100%;
    height: 2em;
    width: 2em;
    text-align: center;
    background: #616161;
    margin: 0 auto;
}

.circle-gray .number {
    margin-top: 0.10em;
    font-size: 1.5em;
    font-weight: bold;
    font-family: sans-serif;
    line-height: 1.4em;
    color: #ffffff;
}

.rtecenter {
  text-align: center;
}