Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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 复选框不';t检查内部数据组件="&引用;_Html_Css_Checkbox_Sass - Fatal编程技术网

Html 复选框不';t检查内部数据组件="&引用;

Html 复选框不';t检查内部数据组件="&引用;,html,css,checkbox,sass,Html,Css,Checkbox,Sass,我正在制作这个复选框列表,在我将其放入这个div并将SCS包装在其中之前,一切都很好: <div data-component="modal"></div> [data-component='modal'] {styling goes here} [data component='modal']{此处设置样式} 除此之外,在css中,它检查得非常好。有人能告诉我发生了什么事吗 另外,之所以称为模态,是因为该复选框位于模态中。一开始我以为模态把事情搞砸了,但效果很好。

我正在制作这个复选框列表,在我将其放入这个div并将SCS包装在其中之前,一切都很好:

<div data-component="modal"></div>
[data-component='modal'] {styling goes here}

[data component='modal']{此处设置样式}
除此之外,在css中,它检查得非常好。有人能告诉我发生了什么事吗

另外,之所以称为模态,是因为该复选框位于模态中。一开始我以为模态把事情搞砸了,但效果很好。出于某种原因,问题出在scss中


这是答案。

问题是你给出了答案

背景:#fff

.custom复选框中。自定义控件指示符{

这就是为什么不显示勾号


将其移除,然后再次检查。

问题在于您给出了

背景:#fff;

.custom复选框中。自定义控件指示符{

这就是为什么不显示勾号


删除该图标并再次检查。

实际上,它可以工作,您正在用背景覆盖检查图标,您可以通过删除或更改此行来测试
背景:35;fff;

也许是这样的

.custom-control-input:checked~.custom-control-indicator{
  background: radial-gradient(circle at center, #1062a4 .6ex, white .7ex);
}

希望有帮助,

实际上它是有效的,您正在用背景覆盖检查图标,您可以通过删除或更改这一行来测试
背景:35;fff;

也许是这样的

.custom-control-input:checked~.custom-control-indicator{
  background: radial-gradient(circle at center, #1062a4 .6ex, white .7ex);
}

希望有帮助,

好的,好的!但是如果没有这个,我怎么能使复选框背景变白呢?虽然你已经回答了我的问题,所以请在一分钟内接受你的答案。等一分钟。在删除它之后添加这个。自定义控件指示符{background:#fff;color:#333;}好的,好的!但是如果不使用该选项,我如何才能使复选框背景变为白色?虽然您确实回答了我的问题,但请在一分钟内接受您的答案。等待一分钟。在删除该选项后添加此选项。自定义控件指示符{background:#fff;color:#333;}