【发布时间】:2016-03-28 23:33:06
【问题描述】:
在 epub 中,我想以这种方式设置单字母列表的样式:
(a) Some text goes here. (b) More text here. (c) This line is longer. It goes on and on. And on some more. And then it keeps going until it wraps. (d) Another long line. This one will wrap too, once it gets to be long enough. You get the idea. The text should always line up while the list letters hang.
以下代码将根据每个列表执行我想要的操作:
ol.alpha_list {
counter-reset: item;
}
ol.alpha_list > li {
list-style: none;
position: relative;
}
ol.alpha_list li:before {
counter-increment: item;
content:"(" counter(item, lower-alpha) ") ";
position: absolute;
left: -1.4em;
}
但这并没有在我的 epub 文件中正确呈现。结果是这样的:
(a) Some text goes here. (b) More text here. (c) This line is longer. It goes on and on. And on some more. And then it keeps going until it wraps. (d) Another long line. This one will wrap too, once it gets to be long enough. You get the idea. The text should always line up while the list letters hang.
有没有办法让它像第一个例子一样工作?
【问题讨论】: