如何启用新的.bg-gradient-实用程序? [英] How do you enable the new .bg-gradient- utilities?

查看:214
本文介绍了如何启用新的.bg-gradient-实用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://blog.getbootstrap.com/

使用$ enable-gradients时,您将启用新的.bg-gradient-实用程序(默认情况下禁用),以用于导航栏等.

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

问:如何使用$ enable-gradients?到目前为止,我刚刚下载了bootstrap.css和.js文件.但是现在显然我必须编译它们了?

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?

推荐答案

是.您必须使用SCSS生成自定义CSS.

我创建了一个小的要点,其中包含有关如何使用node-sass构建Bootstrap的说明和其他一些工具.

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

启动并运行构建工具后,将在导入之前在custom.scss中插入$enable-gradients: true;.

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

然后您可以生成自定义CSS,并且渐变应该起作用!

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

这篇关于如何启用新的.bg-gradient-实用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆