Bootstrap Sass颜色更改JS
是否可以通过单击按钮更改Bootstrap Sass颜色?我尝试谷歌搜索,但什么都没找到。感谢您的任何帮助< 3
Is it possible to change bootstrap sass colors with a click of a button? I tried googling but I didn't find anything. Thanks for any help <3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
不,您无法使用整个SASS文件中的单击按钮更改Bootstrap颜色,因为它在浏览器中不使用,如果将颜色直接应用于属性,则无法在CSS文件中完成。
但是,如果它是CSS变量,则可以对其进行修改,CSS变量看起来像这样
-Theme-Color:blue;
如果您在浏览器中使用预处理器,那么LIST.JS在浏览器中工作可能是可能的,但是我不确定您是否可以通过单击更少地更改变量的值。
我认为您应该回顾自己实际创建的内容。
No you can't change bootstrap colors with a click of button in whole Sass file because it's not used in browser, It can't be done in CSS file globally if color is directly applied to properties.
But you can modify it if it's a CSS variable, a CSS variable looks like this
--theme-color : blue;
That might be possible if you are using preprocessors in Browser, less.js works in browser but I am not sure if you can change value of variable with a click in less.
I think you should review what you are actually creating.