bestrenekton / demos Goto Github PK
View Code? Open in Web Editor NEWsome demo
some demo
使用window.less.modifyVars改变样式发现没有生效,检查后看到新样式确实写入了,但被antd的默认样式覆盖了,请问如何改变优先级,让新样式生效呢?
我是用sass写的样式,html里引用的时候,还可以使用这个js吗,其他的配置有变动吗
你好,请问有没有图片的例子
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;
}
window.less
.modifyVars(
{
'@primary-color': '#ee5e7b',
'@link-color': '#ee5e7b',
'@btn-primary-bg': 'ee5e7b',
}
)
.then(() => { })
.catch(error => {
message.error(Failed to update theme
);
});
wdm」:
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」:
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」:
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」:
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」:
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」:
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」:
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」:
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」:
ℹ 「wdm」: Compiled successfully.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.