我正在使用 Jekyll 和 Liquidwebsite http://annawees.github.io.
我一直坚持在 CSS 中使用 Liquid 来正确编译。我尝试为每个页面的边框使用不同的颜色,并将默认设置为黑色。
我很欣赏你们的任何见解。
#splash {width: 100%; height: 10%;}
#splash background-color: {% if page.accent %}{{ page.accent }}{% else %}{{ black }}{% endif %}
<div id= "splash"> </div>
你需要 2 行---
位于文件顶部,以便正确编译。
Source: https://jekyllrb.com/docs/assets/ 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%;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)