search
HomeWeb Front-endHTML TutorialWhat should I do if Google Chrome does not support CSS settings for text smaller than 12px?

The tutorial I bring to you today is a solution to the problem that Google Chrome does not support setting CSS smaller fonts.

Web pages often use large or small text for beautiful layout. Usually ##font-size text is 12px (pixel) text. Set the text font to be larger than 12px, and each browser can display the text size effect set by CSS. However, when the CSS setting is smaller than 12px text, Google Chrome cannot display the text font effect set by CSS smaller than 12px.

Google Chrome support settings

font-sizeSolution for pixels smaller than 12px

The default minimum font of Google Chrome is 12px, and fonts smaller than 12px will be displayed as 12px. Sometimes we need to make the font smaller, especially when making English websites, we often use CSS styles to display text smaller than 12px, so that Google Chrome cannot display the smaller text. There are solutions though.

Solve the required CSS code

Add a Google Chrome-specific kernel

attribute style in the html or body (or if you need to set the small text font object CSS SelectorYou can also add) the following CSS code:

html,body{-webkit-text-size-adjust:none;}或.pcss5{-webkit-text-size-adjust:none;}

Note: If this attribute is used, the browser's font will not be able to use the zoom function! (It is the function of holding down the CTRL key and scrolling the middle mouse button up and down)

Try changing the unit - useless:

Some friends also said that using em (characters) as the unit to define the font size is useful. I have personally tested that the smallest font size in Google Chrome will not be smaller than 12px. So it's useless. For now I only know the above method.

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

Answers to questions about camel case naming and JS

Boolean values, relational operators in JS, Detailed explanation and examples of logical operators

## Summary of the front-end js framework and explanation of its uses

The above is the detailed content of What should I do if Google Chrome does not support CSS settings for text smaller than 12px?. For more information, please follow other related articles on the PHP Chinese website!

Statement
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
Ubuntu Linux中如何删除Firefox Snap?Ubuntu Linux中如何删除Firefox Snap?Feb 21, 2024 pm 07:00 PM

要在UbuntuLinux中删除FirefoxSnap,可以按照以下步骤进行操作:打开终端并以管理员身份登录到Ubuntu系统。运行以下命令以卸载FirefoxSnap:sudosnapremovefirefox系统将提示你输入管理员密码。输入密码并按下Enter键以确认。等待命令执行完成。一旦完成,FirefoxSnap将被完全删除。请注意,这将删除通过Snap包管理器安装的Firefox版本。如果你通过其他方式(如APT包管理器)安装了另一个版本的Firefox,则不会受到影响。通过以上步骤

mozilla firefox可以卸载吗mozilla firefox可以卸载吗Mar 15, 2023 pm 04:40 PM

mozilla firefox可以卸载;firefox属于第三方浏览器,如果不需要,完全可以卸载。卸载方法:1、在开始菜单中,依次点击“Windwos系统”-“控制面板”;2、在“控制面板”界面中,点击“程序和功能”;3、在新界面中,找到并双击火狐浏览器图标;4、在卸载弹窗中,点击“下一步”;5、点击“卸载”即可。

火狐浏览器Firefox 113 新特性:支持AV1动图、增强密码生成器和画中画特性火狐浏览器Firefox 113 新特性:支持AV1动图、增强密码生成器和画中画特性Mar 05, 2024 pm 05:20 PM

近日消息,Mozilla在发布Firefox112稳定版的同时,也宣布下个主要版本Firefox113进入Beta频道,支持AV1动图、增强密码生成器和画中画特性。火狐浏览器Firefox113主要新功能/新特性如下支持AV1格式动图(AVIS)通过引入特殊字符来增强密码生成器的安全性增强画中画功能,支持后退、显示视频时间,能更轻松地启用全屏模式为Debian和Ubuntu发行版提供官方DEB安装文件更新书签导入功能,默认情况下支持导入书签的图标在支持的硬件上默认启用硬件加速AV1视频解码使用w

Scrapy中如何使用Mozilla Firefox来解决扫码登录的问题?Scrapy中如何使用Mozilla Firefox来解决扫码登录的问题?Jun 22, 2023 pm 09:50 PM

对于爬虫爬取需要登录的网站,验证码或扫码登录是一个很困扰的问题。Scrapy是Python中一个非常好用的爬虫框架,但是在处理验证码或扫码登录时,需要采取一些特殊的措施。作为一个常见的浏览器,MozillaFirefox提供了一种解决方案,可以帮助我们解决这个问题。Scrapy的核心模块是twisted,它只支持异步请求,但是一些网站需要使用cookie和

火狐浏览器Firefox 115发布,支持Win7/Win8.1的最后一个版本火狐浏览器Firefox 115发布,支持Win7/Win8.1的最后一个版本Mar 04, 2024 pm 04:46 PM

今日最新消息,Mozilla今天正式发布了火狐浏览器Firefox115稳定版更新,本次更新最值得关注一点是,这是支持Win7/Win8、macOS10.12、10.13和10.14的最后一个版本。下载地址:https://ftp.mozilla.org/pub/firefox/releases/115.0/Mozilla在官方更新日志中表示:微软于2023年1月结束了对Win7和Win8系统的支持,而今天发布的Firefox115版本是上述系统用户收到的最后一个版本更新。Win7和Win8用户

Apple 发布更新以修复 MacBook 中的 WebKit 漏洞和过度耗电Apple 发布更新以修复 MacBook 中的 WebKit 漏洞和过度耗电Apr 15, 2023 am 10:49 AM

Apple已发布适用于iPhone、iPad、Mac和AppleWatch的更新。尽管每个设备的更新都很小,但它们解决了WebKit漏洞。该公司还保证已经修复了一个错误,该错误会导致MacBook笔记本电脑意外耗尽电池。AppleiOS和iPadOS15.3.1是次要更新。它实际上不包含任何主要功能。但是,它对使用盲文显示器的人很有用。此外,该更新还解决了任意代码执行漏洞。iOS15.3.1的更新说明提到:iOS15.3.1为您的iPhone提供了重要的安全更新,并修

Ubuntu 23.10默认将在原生 Wayland 模式下运行火狐浏览器 FirefoxUbuntu 23.10默认将在原生 Wayland 模式下运行火狐浏览器 FirefoxFeb 29, 2024 am 10:10 AM

Canonical公司近日宣布,在即将发布的Ubuntu23.10中,FirefoxSnap已配置默认在Wayland模式下运行。注:Ubuntu目前已经默认Wayland会话,Firefox也能正常工作。不过当前FirefoxSnap实际上是以XWayland兼容模式下运行,而不是严苛的原生Wayland模式。Canonical宣布默认会在Wayland模式下运行Firefox浏览器,从而在HiDPI显示器不会出现界面模糊、缩放失真等问题,并且支持拖动、手势捏合等触控手势。如上所述,Ubunt

苹果应该继续在 iOS 上禁止竞争对手的浏览器引擎吗?苹果应该继续在 iOS 上禁止竞争对手的浏览器引擎吗?Apr 16, 2023 pm 07:22 PM

苹果要求所有在iOS和iPadOS中浏览网页的应用程序都使用自己的浏览器引擎WebKit,但在被指控反竞争行为的情况下,它是否应该继续有效地禁止竞争对手的浏览器引擎?最近,大型科技公司一直受到反竞争行为的指控,英国竞争与市场管理局(CMA)首席执行官安德里亚·科斯切利(AndreaCoscelli)在新闻稿中宣布:苹果和谷歌对我们使用手机的方式已经形成了一种恶习,我们担心这会导致英国数百万人迷失方向。在这些反竞争行为的指控中,苹果因要求浏览网络的应用程序在iOS和iPadOS上使

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment