- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在为我的 website 使用 Jekyll 和 Liquid .
我一直坚持在 CSS 中使用 liquid 来正确编译。我正在尝试为每个页面的边框使用不同的颜色,并将默认设置为黑色。
我很感激你们可能有的任何见解。
#splash {width: 100%; height: 10%;}
#splash background-color: {% if page.accent %}{{ page.accent }}{% else %}{{ black }}{% endif %}
<div id= "splash"> </div>
最佳答案
您需要在文件顶部添加 2 行 ---
才能正确编译。
来源:https://jekyllrb.com/docs/assets/
您还需要在背景颜色的 css 代码周围添加 {
。
---
---
#splash {
width: 100%; height: 10%;
}
#splash {
background-color: {% if page.accent %}{{ page.accent }}{% else %}{{ black }}{% endif %};
}
或者,您可以像这样合并 2 个 CSS 语句:
---
---
#splash {
background-color: {% if page.accent %}{{ page.accent }}{% else %}{{ black }}{% endif %};
height: 10%;
width: 100%;
}
关于html - 在 Jekyll 的 CSS 中使用 liquid tempting 以每页为基础调整 div 的背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42524517/
在 HTML5 中,是否可以创建仅供单个网页访问的本地存储? 我目前正在尝试编写独立的单页应用程序的可能性,以及用户是否可以自己托管它们,例如在他们的 Dropbox(它有一些公共(public)文件
我正在考虑在我的网站上转换广告的选项,并认为我会从 Google Adsense 开始 - 但是我不确定每页实际上可以有多少广告。我猜可以将横幅与说广告块等混合和匹配 - 那么您可以在单个页面上拥有的
我使用 Jekyll 创建了我的博客。有人告诉我,我的网站正在为某些页面编制 3 个 URL 的索引,这将被归类为 Google 的重复内容。我注意到我可以访问: https://villaagogo
我正在将 sitemesh 用于基于 spring 的站点。问题是我有一些 javascript,我希望它使用 jquery 在一个特定页面的 onload 事件上运行 $(function() {
我有一个分页脚本,它显示所有页面的列表,如下所示: 上一个 [1][2][3][4][5][6][7][8][9][10][11][12][13][14] 下一个 但我想一次只显示十个数字: 上一个
我在 Asp.Net 网站上工作。目前,我正在为每个页面(加载时)创建(并关闭)一个数据库连接。但我不确定,那是真正的方法。我想知道,如果我在静态类或 WebApplication 的主 Global
我想要的是:给定一个 10 页的 pdf 文件,我想在网络上的表格中显示该 pdf 的每一页。实现这一目标的最佳方法是什么?我想一种方法是将这个 10 页 pdf 文件拆分为 10 个 1 页 pdf
我网站的不同页面有不同的 js 需求(主要是插件),有些需要灯箱,有些不需要,有些需要轮播,有些不需要等等。 关于页面加载速度我应该 选项 1 - 在需要时引用每个 js 文件: 所以一页可能有:
我正在使用 Ionic2 slider ,来自其组件:http://ionicframework.com/docs/v2/api/components/slides/Slides/ .我不知道如何让
我正在尝试从 CsrfGuard.properties 启用 token 标准页面。但部署后,当我尝试访问 URL 时,我收到 500 错误,因为它抛出以下异常。 你能帮我解决这个问题吗?我需要在哪里
我是一名优秀的程序员,十分优秀!