首先在头部head中加入js代码:
<script type="text/javascript"> function FontZoom(fsize){ var ctext = document.getElementById("newstext"); ctext.style.fontSize = fsize +"px"; } </script>再在内容调用的标签闭合中加上id值,比如: <div id="newstext">[!--newstext--]</div>
再在合适的位置加上点击代码:
字体:【<a href='javascript:FontZoom(16)'>大</a> <a href='javascript:FontZoom(14)'>中</a> <a href='javascript:FontZoom(12)'>小</a>】
其中上面代码中的数字是字体的大小,根据自己的需求进行合适的改变,一般默认就好了。
效果加上后点击查看。
本文地址:https://www.kaifamei.com/empirecms_faq/72.html