Html epub中的样式字母列表
在epub中,我想用以下方式设计一个单字母列表: 以下代码将根据每个列表执行我想要的操作:Html epub中的样式字母列表,html,css,epub,Html,Css,Epub,在epub中,我想用以下方式设计一个单字母列表: 以下代码将根据每个列表执行我想要的操作: 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-
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文件中无法正确渲染。结果是这样的:
有没有办法让它像第一个例子那样工作?尝试在li css中添加“列表样式位置:外部”和“左边距:2em;”
ol.alpha_list {
counter-reset: item;
}
ol.alpha_list > li {
list-style: none;
position: relative;
list-style-position: outside;
margin-left: 2em;
}
ol.alpha_list li:before {
counter-increment: item;
content:"(" counter(item, lower-alpha) ") ";
position: absolute;
left: -1.4em;
}
谢谢你的尝试,但是没有用。我正在用Calibre编辑这本书,它正确地呈现了(我原来的CSS也是如此),但在我的iPhone上,它不能用Marvin正确地呈现。不过,iBooks似乎可以工作,这很奇怪,因为我以为iBooks和Marvin会使用相同的HTML渲染器。哇!马文有一个设置“切换到出版商的格式”,这就成功了。当我这样做时,它现在在Marvin中正确呈现。再次感谢!
(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;
list-style-position: outside;
margin-left: 2em;
}
ol.alpha_list li:before {
counter-increment: item;
content:"(" counter(item, lower-alpha) ") ";
position: absolute;
left: -1.4em;
}