Jekyll现在博客文本对齐

时间:2016-05-18 05:49:42

标签: css jekyll text-alignment kramdown

如何以最简单的方式在Jekyll Now中对文本进行对齐?我尝试了{: .text-justify},但没有工作。

1 个答案:

答案 0 :(得分:1)

嗯,你已经完成了一半。

您正在使用Inline Attribute Lists (IAL)来向html元素添加属性。

Aenean massa. Cum sociis natoque penatibus ...
{: .my-class}

这会在段落中添加.my-class类。

<p class="my-class">Aenean massa. Cum sociis natoque penatibus …</p>

现在,您只需为此类添加相应的cascading style sheet规则。

.my-class{
   text-align: justify;
}

重要提示:一种辅助功能最佳做法是avoid justified text

相关问题