【发布时间】:2016-03-24 07:25:35
【问题描述】:
我一直在玩 Drupal 8。目前我想在 Bartik 中有一个图像作为标题背景。为此,我通过以下方式创建了一个名为“freex”的子主题:
在 /themes/custom/ 中创建文件夹 freex
在 /themes/custom/freex/ 中创建 freex.info.yml 包含:
name: Freex
description: Basis thema voor verenigingen
type: theme
core: 8.x
base theme: bartik
libraries:
- freex/global-styling
在 /themes/custom/freex/ 中创建文件 freex.libraries.yml,其中包含:
global-styling:
version: 1.0
css:
theme:
css/style.css: {}
在 /themes/custom/freex/css/ 中创建名为 style.css 的文件,其中包含:
#header {
background-color: yellow;
}
只是看看它的工作原理......它没有,标题不会改变背景颜色。关于我缺少什么的任何想法?
【问题讨论】:
-
你是否从 Appearance 激活了这个主题
-
您的自定义主题是否显示在外观下?你激活了这个主题吗?是否包含 style.css 文件?请提供更多信息
-
是的,包含 css 文件,我在以下位置找到它:files/css/css_ety5xdAt69LTpeH6p9fbVbET2KclBgUgZCeet9COWtE.css?o4sf9o 当我这样做时:查看源代码,所以问题变成了,为什么我的条目:#header {background-color:yellow;} 不让标题背景变黄?另外,如何在评论中添加换行符以使其在此处保持可读?
-
您可以关闭颜色模块!或者操纵它来获得你想要的颜色。
标签: drupal-8