Bootstrap主题错误:设置配色方案时出现问题

时间:2019-04-09 08:07:26

标签: css sass themes color-scheme bootstrap-themes

我正在为我的非营利协会设计一个网页,为了使事情变得更容易,我购买了引导主题模板(Leap Bootstrap Theme)。

在项目的主文件夹中,我有以下文件夹:

/ dist
/ forms
/ js
/ node_modules
/ pages
/ scss

在“ / scss”文件夹中,为了修改主题的配色方案,设置所需的颜色,我必须以这种方式修改文件“ /scss/user-variables.css”:< / p>

// 
// 
// user-variables.scss
//
// Place your own variable overrides here, these will override any Bootstrap and theme variables.


// Color Scheme
// Uncomment the variables below and change the hex values.

$primary: #3D3B3C;
$primary-2: #FDFDB7;
$primary-3: #3D3B3C;

// Do not change or remove the $theme-color-scheme or $theme-colors maps below

$theme-color-scheme: (
    "primary":    $primary,
    "primary-2":  $primary-2,
    "primary-3":  $primary-3
);

$theme-colors: (
    "primary":    $primary,
    "primary-2":  $primary-2,
    "primary-3":  $primary-3,
);

'index.html'文件位于'/ pages'文件夹内,还有其他文件夹(css,js,img,字体,...)。

当我用gulp和browsersync进行这些更改时,将显示出我想要的正确的配色方案(正如我编码到user-variables.css文件中一样)。

问题是当我将文件上传到Web托管服务器时。当我访问网站时,仍然看到引导主题的原始配色方案,而不是我设置的颜色。令人毛骨悚然的是,一些外部用户查看了正确的颜色。

在“ public”文件夹中,我仅上传“ index.html”文件和“ / assets”文件夹。我必须上传该“ user-variables.css”文件,在何处?

您能帮我解决这个问题吗?抱歉,但是我是这个世界的新手。

谢谢!

1 个答案:

答案 0 :(得分:0)

就我而言,您的网站显示为黑色。 我想,Maties Alzina Soler想要告诉您清除缓存。 为此,请在您的站点上按SHIFT + F5或Ctrl + F5。