我正在使用 <cfpresentation>
创建 PPT使用 ColdFusion 9.0.1 标记。演示文稿已生成,但其中的信息未在编码时显示。我正在使用 <div>
标签来创建列输出。但是在PPT中生成时,格式被忽略,数据显示为全文行,右侧栏显示在左侧栏信息的正下方。以下是 <cfpresentation>
中的 css 和 html 代码.关于如何使代码和演示文稿完全按照编码显示的任何想法,即分栏输出?
content {
clear: both;
width: 500px;
padding-bottom: 10px;
overflow:hidden;
margin-left:20px;
margin-right:20px;
}
#contentLeft {
float: left;
width: 250px;
margin-left:10px;
}
#contentRight {
width: 250px;
margin-left:55%;
}
HTML:
<cfpresentationslide>
<div id="content" style="font-size:10px;">
<div id="contentLeft">
<span style="font-weight:bold;">• #title# - </span>
<span style="font-weight:normal;">#backupinfo#</span><p></p>
</div>
<div id="contentRight">
<span style="font-weight:bold;">• #title# - </span>
<span style="font-weight:normal;">#backupinfo#</span><p></p>
</div>
</div>
</cfpresentationslide>
最佳答案
我的猜测是 <cfpresentationslide>
标签无法从您的样式表中提取 CSS 样式。尝试在 <cfpresentationslide>
中使用内联样式标记而不是 content
, contentLeft
, 和 contentRight
.
像这样:
<cfpresentationslide>
<div style="font-size:10px; clear:both; width:500px; padding-bottom:10px; overflow:hidden; margin-left:20px; margin-right:20px;">
<div style="float:left; width:250px; margin-left:10px;">
<span style="font-weight:bold;">• #title# - </span>
<span style="font-weight:normal;">#backupinfo#</span><p></p>
</div>
<div style="width:250px; margin-left:55%;">
<span style="font-weight:bold;">• #title# - </span>
<span style="font-weight:normal;">#backupinfo#</span><p></p>
</div>
</div>
</cfpresentationslide>
或者,您可以创建一个具有所需格式的单独 HTML 文件,然后使用 src
包含该文件<cfpresentationslide>
的属性标签。也许这将允许使用外部样式表,但我只是猜测。
关于css - cfpresentation 不保留 PowerPoint 中的 div 格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18104023/