Home > CMS Tutorial > DEDECMS > body text

How to allow users to choose the font size on the DreamWeaver article page

藏色散人
Release: 2019-12-03 09:38:58
Original
2127 people have browsed it

How to allow users to choose the font size on the DreamWeaver article page

How to allow users to choose the font size on the DreamWeaver article page?

The article page of DEDECMS allows users to choose the font size

Recommended learning:CMS

1. Put the following code After the and before of the content page template.

<script Language="JavaScript"> 
function FontZoom(fsize){ 
var ctext = document.getElementById("content"); 
ctext.style.fontSize = fsize +"px"; 
}</script>
Copy after login

2. Put the following code where the case needs to be called:

<small>字体:</small> [<a href=&#39;javascript:FontZoom(16)&#39;>大</a> 
<a href=&#39;javascript:FontZoom(14)&#39;>中</a> <a href=&#39;javascript:FontZoom(12)&#39;>小</a>]
Copy after login

3. Use the code in the BODY part of the content page:

Put the original template in

is changed to

Note: If you are not using the official template, you need to modify the corresponding The code may not be the content, please pay attention!

The above is the detailed content of How to allow users to choose the font size on the DreamWeaver article page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template