在帝国CMS系统内容页点击改变字号大小的操作方法
1.在内容模板的头部里加入下面的代码:<script type="text/javascript">function FontZoom(fsize){ var ctext = document.getElementById("contents"); ctext.style.fontSize = ……
1.在内容模板的头部里加入下面的代码:
<script type="text/javascript">function FontZoom(fsize){ var ctext = document.getElementById("contents"); ctext.style.fontSize = fsize +"px";}</script>
2.把你想要改变字体大小的内容部分加上id名。如:
<div id="contents">[!--newstext--]</div>
3.在你想要放控制按钮的地方放入下面的代码:
字体:【<a href='javascript:FontZoom(16)'>大</a> <a href='javascript:FontZoom(14)'>中</a> <a href='javascript:FontZoom(12)'>小</a>】
注释:16,14,12就是字号的大小,可以修改为你想要的数字。
- 上一篇
介绍下帝国CMS用灵动标签调用多表多模型文章信息的写法
调用多模型的最新文章[e:loop={'select * from ( select id,classid,titleurl,filename,title,newstime,titlepic from [!db.pre!]ecms_movie where newstime union select id,classid,titleurl,filename
- 下一篇
介绍下帝国CMS列表页模板调用TAG的两种方法
方法一:$tagstr='';$tsql=$empire->query("select tagid from {$dbtbpre}enewstagsdata where id='$r[id]' and classid='$r[classid]' ");while($tr=$empire->fetch($tsql)){$tt=$empire->fetch1("select *