@import '~antd/dist/antd.less';
:global{
body {
margin: 0;
padding: 0;
font-family: sans-serif;
border: 4px solid greenyellow;
.ant-btn{
border-radius: 7px ; // work
background-color: 'rgba(0, 0, 0, 0.42)' !important; // do not work
color: 'red' !important; // do not work
}
}
}
上面的代码,我想修改按钮的全局样式,所以有代码
.ant-btn{
border-radius: 7px ; // work
background-color: 'rgba(0, 0, 0, 0.42)' !important; // do not work
color: 'red' !important; // do not work
}
但是颜色和背景色都不起作用! border-redius运作良好! 为什么?
{
test: /\.less$/,
// loader: ["style-loader","css-loader","less-loader"],
use:[
"style-loader",
"css-loader",
{
loader: "less-loader",
options: {
javascriptEnabled: true
}
}
]
},