We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好,请问有没有图片的例子 vars.less @import "antd/lib/style/themes/default.less"; @link-color: #00375B; @primary-color: #00375B; @images: url('@/assets/images/bg1.png'); // @ 是设置的 src目录 :root { --image: @images; --primary-color: @primary-color; //color.less中加入css原生变量:--PC }
调用的less .home { // background-color: var(--primary-color); // 这么调用颜色成功了 background-image: var(--image); // 这么调用图片返回 background-image: url(http://localhost:3000/~@/assets/images/bg1.png); background-position: 100% 100%; background-repeat: no-repeat; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
你好,请问有没有图片的例子
vars.less
@import "
antd/lib/style/themes/default.less";@/assets/images/bg1.png'); // @ 是设置的 src目录@link-color: #00375B;
@primary-color: #00375B;
@images: url('
:root {
--image: @images;
--primary-color: @primary-color; //color.less中加入css原生变量:--PC
}
调用的less
.home {
// background-color: var(--primary-color); // 这么调用颜色成功了
background-image: var(--image); // 这么调用图片返回 background-image: url(http://localhost:3000/~@/assets/images/bg1.png);
background-position: 100% 100%;
background-repeat: no-repeat;
}
The text was updated successfully, but these errors were encountered: