【发布时间】:2013-02-16 17:47:58
【问题描述】:
我有以下 CSS
h1:before {
content: "Chapter " counter(lvl1) "\000d\000a";
counter-increment: lvl1;
white-space: pre-wrap;
}
h1 {
page-break-before: right;
}
还有这个 HTML
<p>...</p>
<h1>A Title</h1>
<p>...</p>
使用给定的 CSS,我得到类似的东西
Chapter 1
A Title
当我尝试使用 jQuery 获取文本时,我得到“A Title”。是否有可能获得“Chapter 1\nA Title”?
谢谢
【问题讨论】: