我通过antd-init --type plain-react 生成一个项目,然后在index.less里面加了css代码,npm run build后并未生效。
具体css代码如下:
:global {
html, body, #root {
height: 100%;
}
body {
background: #fafafa;
}
}
.loginForm {
width: 25rem;
height: 18.75rem;
position: fixed;
top: 50%;
margin-top: -9.375rem;
left: 50%;
margin-left: -12.5rem;
background-color: #ffffff;
opacity: 0;
-webkit-transform: scale(.8);
transform: scale(.8);
}
另外请问:global是什么意思?初次接触相关知识,望各位大侠指教。
已解决,没有在js中导入的原因。