Home Web Front-end JS Tutorial Several ways to change the default font size of ExtJs (organize it yourself)_extjs

Several ways to change the default font size of ExtJs (organize it yourself)_extjs

May 16, 2016 pm 05:36 PM
extjs font

Here are several methods of collecting online, I hope it will be useful to everyone.
1.
Just replace all 11px in the ext-all.css style file with 12px, so that it becomes a unified 12px font.
But if you want to increase the size, not only do you need to change the 11px of the source file to 15px, but you also need to change the 12px related to the font to 15px.

After the modification, the button has rough edges. Add

to the style file. Copy the code . The code is as follows:

.ext-ie .x-btn-text-icon .x-btn-center .x-btn-text {
padding:3px 0px 0px 0px;
}

The burrs are gone!
2.
Because the Extjs font size displayed in different browsers or different versions of the same browser is different. And it looks smaller. Not pleasing to the eye.

Check it online and get a piece of useful information: Extjs uses 11px font in many cases. The 11px size is an edge font. Different browsers render 11px
differently. IE’s The rendering is similar to 12px, and in Firefox, it is similar to 10px, causing the font to be too small in FF
.
In order to completely solve the font size problem, open ext-all.css directly, find all 11px and replace it with 12px. Problem solved
3.
Extjs version 3.2.1, font size modified
I found a lot of information on the Internet, and they all said to add
copy Code The code is as follows:

.x-btn-text{
font-size:15px;
}

This is fine, but it still doesn’t work under IE9 and FF.
Later, I went to ext-all.css and tried it slowly, and then I found the setting place.
Just put the following code into other css for reference:
Copy the code The code is as follows:

.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{
background-position: 0 center;/*Default*/
background-repeat : no-repeat;/*Default*/
padding-left:18px;/*Default*/
height:16px;/*Default*/
font-size:15px;/*Font size setting */
}
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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

win10 font folder path details win10 font folder path details Jan 03, 2024 pm 08:37 PM

win10 font folder path details

How to change the font in Outlook on Apple mobile phone How to change the font in Outlook on Apple mobile phone Mar 08, 2024 pm 04:46 PM

How to change the font in Outlook on Apple mobile phone

How to make vivo mobile phone font larger and where to set it How to make vivo mobile phone font larger and where to set it Feb 24, 2024 pm 06:16 PM

How to make vivo mobile phone font larger and where to set it

How to adjust the font, style, and size of Notepad in Windows 11 How to adjust the font, style, and size of Notepad in Windows 11 Sep 23, 2023 pm 11:25 PM

How to adjust the font, style, and size of Notepad in Windows 11

How to solve win11 font blur problem How to solve win11 font blur problem Jan 13, 2024 pm 09:00 PM

How to solve win11 font blur problem

Detailed explanation of Win11 font installation method Detailed explanation of Win11 font installation method Dec 27, 2023 pm 05:16 PM

Detailed explanation of Win11 font installation method

How to change the font of Xiaomi 11_How to change the font of Xiaomi 11 How to change the font of Xiaomi 11_How to change the font of Xiaomi 11 Mar 25, 2024 pm 07:26 PM

How to change the font of Xiaomi 11_How to change the font of Xiaomi 11

Detailed explanation of how to deal with all font shadows in Win10 computer Detailed explanation of how to deal with all font shadows in Win10 computer Jul 23, 2023 pm 11:13 PM

Detailed explanation of how to deal with all font shadows in Win10 computer

See all articles