下面的HTML/CSS适用于最近的浏览器,而不是CF9的cfdocument。有人有想法吗?
我知道什么?是的!我知道CF的cfdocument支持一组有限的CSS属性。CF文档表示支持反重置、反增量和计数器。
预期输出
杂货:
1)苹果
2)香蕉
3)加拿大羚羊
示例代码
<cfdocument format="PDF" pagetype="letter"
margintop="0.5" marginbottom="0.5"
marginleft="0.5" marginright="0.5">
<html>
<head>
<style type="text/css">
li { list-style-type: none; }
ol { counter-reset: ordered;
padding-left: 0.5em;
border: solid 1px #F00;
}
li:before { counter-increment: ordered;
content: counter(ordered) ") ";
}
</style>
</head>
<body>
<strong>GROCERIES:</strong><br>
<ol>
<li>Apples</li>
<li>Bananas</li>
<li>Cantelopes</li>
</ol>
</body>
</html>
</cfdocument>发布于 2012-08-23 21:11:42
我认为它可能有助于指定列表样式类型,这将使您更接近。它在数字之后有小数点:
杂货:
<cfdocument format="PDF" pagetype="letter"
margintop="0.5" marginbottom="0.5"
marginleft="0.5" marginright="0.5">
<html>
<head>
<style type="text/css">
ol {list-style-type: none;}
li:before {content: counter(section, decimal) ") ";}
li { counter-increment: section;}
</style>
</head>
<body>
<strong>GROCERIES:</strong><br>
<ol>
<li>Apples</li>
<li>Bananas</li>
<li>Cantelopes</li>
</ol>
</body>
</html>
</cfdocument>https://stackoverflow.com/questions/12096043
复制相似问题