Home > Web Front-end > HTML Tutorial > How can I enlarge or reduce only the fonts in the content layer? I don't want the whole page to zoom in or out. Please advise! Thanks! _html/css_WEB-ITnose

How can I enlarge or reduce only the fonts in the content layer? I don't want the whole page to zoom in or out. Please advise! Thanks! _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:08:54
Original
1776 people have browsed it

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="viewworklog.aspx.cs" Inherits="viewworklog" %>





    
    






    


    

        

        
        


    


; , I used it. The above one is for enlarging or reducing the entire page.
Please tell me how to enlarge or reduce only the fonts in the content layer: div class="titlecont">? I don't want the whole page to zoom in or out. Please advise! Thanks!




Reply to the discussion (solution)

JS changes the area font-size or write several styles separately, and JS controls the switch
fontbig {font-size:16px;}

fontnormal{font-size:14px;}

fontsmall{font-size:12px}


The code is so messy, please give me a jquery reference:
http://www.shopdev.co.uk/blog/font-resize.html
There are actually many ways.
One: directly change the CSS font size.

Second: Set some CLASS with different font sizes, then addClass, removeClass for control.

It is better to use px or em, and use less 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'

My idea is to use JS to dynamically add font size styles to the divs you want to add.

JS changes the font-size of the area
Or write several styles separately, and JS controls the switching

fontbig{font-size:16px;}

fontnormal{font-size:14px;}

fontsmall{font-size:12px}


Can you change it on mine? Thanks!

The code is so messy, please give me a jquery reference:
http://www.shopdev.co.uk/blog/font-resize.html
In fact, there are many methods.
One: directly change the CSS font size.

Second: Set some CLASS with different font sizes, then addClass, removeClass for control.

It is better to use px or em, and use less 'xx-small', 'x-small', 'small', 'medium',...

I tried the URL you gave me , but maybe I have a css style, so after adding it, there is no change in the operation.



Just replace your original ones with these two lines.

It’s very simple to learn jQuery.

Add different CSS styles to different DIVs. .

I don’t know why, I tried, but it still can’t come out! well.

Still don’t know how to do it, can anyone take another look?

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