使用slate主题在github页面上覆盖CSS? [英] Overriding CSS on github pages using slate theme?

查看:59
本文介绍了使用slate主题在github页面上覆盖CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图覆盖github.io页面上的 forkme横幅,以更好地了解Jekyll,HTML,CSS和GitHub的工作方式。

I am trying to override the "forkme" banner on my github.io page to get a better understanding of how Jekyll, HTML, CSSand GitHub works.

为此,我创建了自述文件中提到的 ./ assets / css / style.css 文件有关如何自定义官方支持的GitHub主题的CSS的官方文档。我在其中添加了以下CSS:

For that purpose, I created my ./assets/css/style.css file as mentioned in the readme of the official documentation on how to customize the CSS of the officially supported GitHub themes. I added the following CSS to it:

#forkme_banner { display: none; }

但是,不走运,旗帜不会消失。即使将虚构元素添加到CSS文件中,例如 #test {testing:testtest;} 也不会将行添加到我的CSS文件中。

However, no luck, the banner doesn't disappear. Even adding fictitious elements to the CSS file like #test {testing: testtest;} doesn't add the line to my CSS file.

推荐答案

重命名资产/ css / style.css style.scss
并更改您的scss代码:

rename assets/css/style.css to style.scss and change your scss code to :

---
---
@import "{{ site.theme }}";
#footer_wrap {display: none;}
#forkme_banner {display: none;}
#downloads {display: none;}
#whocares {haha: hehe;}

这篇关于使用slate主题在github页面上覆盖CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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