Html I';我试图用css设置一个页脚,我需要有两行
我有这个css:Html I';我试图用css设置一个页脚,我需要有两行,html,css,pdf,visualforce,Html,Css,Pdf,Visualforce,我有这个css: @page { size: letter; margin: 15mm; @top-center { font-family: Arial Unicode MS; content: "Header stuff- blah blah"; } @bottom-center {
@page {
size: letter;
margin: 15mm;
@top-center {
font-family: Arial Unicode MS;
content: "Header stuff- blah blah";
}
@bottom-center {
content: "Page " counter(page) " of " counter(pages);
}
}
我有一个Visualforce页面,它被转换成PDF格式,CSS在每个页面底部都有一个页面计数器。最终,VF页面中只包含html
我想添加一个URL,该URL出现在每页页面计数器上方的页脚中,但我一直无法找到它
有什么想法吗
谢谢 你需要两件事:
- 插入通常在
,这可以通过内容中不允许的换行符
完成(十六进制的A=十进制的10。“换行符”,通常显示为\A
是ASCII表格中的第10个字符)\n
- 你需要尊重新行、开箱即用的多个空格、制表符等在HTML中被愉快地忽略(这就是为什么我们使用
等)@页面{ 大小:A5景观; @右下角{ 内容:“https://stackoverflow.com\“计数器(第页)”的“计数器(第页)”; 空白:行前; } }
<apex:page sidebar="false" showHeader="false" applyHtmlTag="false"
standardStylesheets="false" readonly="true"
renderAs="pdf">
<html>
<head>
<style type="text/css">
@page {
size: A5 landscape;
@bottom-right {
content: "https://stackoverflow.com\A" counter(page) " of " counter(pages);
white-space: pre-line;
}
}
</style>
</head>
</html>
</apex:page>