How do you enable the new .bg-gradient- utilities?

泄露秘密 提交于 2019-12-21 10:51:13

问题


https://blog.getbootstrap.com/ says

And when you use $enable-gradients, you’ll enable the new .bg-gradient- utilities (disabled by default) for use in navbars and more.

Q: How do I use $enable-gradients? Up until now I've just downloaded the bootstrap.css and .js files. But now apparently I have to compile them?


回答1:


Yes. You have to generate a custom CSS using SCSS.

I've created a small Gist with instructions how to build Bootstrap using node-sass and a few other tools.

After getting the build tools up and running, you'll insert $enable-gradients: true; in custom.scss before the imports.

Then you can generate the custom CSS, and gradients should work!



来源:https://stackoverflow.com/questions/46895379/how-do-you-enable-the-new-bg-gradient-utilities

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!