<分区>
标签 css
<分区>
bootstrap中CSS代码中的“--blue”有什么作用?如果更改默认颜色值,我在哪里可以找到引用?
:root {
--blue: #007bff;
--indigo: #6610f2;
--purple: #6f42c1;
--pink: #e83e8c;
--red: #dc3545;
}
最佳答案
这些是 Custom Properties也称为 CSS 变量
,可以使用 var()
函数在您的 CSS
文件中使用。
来自 MDN
Property names that are prefixed with --, like --example-name, represent custom properties that contain a value that can be used in other declarations using the var() function.
关于css - bootstrap中CSS代码中--blue的作用是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54464242/