问题
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