当前位置:网站首页>Avoid hidden text when loading fonts
Avoid hidden text when loading fonts
2022-08-01 23:08:00 【Ziwei front end】
It takes time to load large fonts.Most browsers hide text until the font is fully loaded.This problem is called Flickering of Invisible Text (FOIT).
We can prevent it from happening by asking the browser to use the system font while the custom font is still loading.Once the font is loaded, it will replace the system font used previously.This phrase is also known as flashing of unstyled text (FOUT).
To archive it, we can use the following
`font-display` style:@font-face {font-family: 'Roboto';font-display: swap;}If you are using Google fonts, then placing the
`display=swap` parameter is the equivalent way:边栏推荐
- xctf attack and defense world web master advanced area web2
- When solving yolov5 training: "AssertionError: train: No labels in VOCData/dataSet_path/train.cache. Can not train"
- y84. Chapter 4 Prometheus Factory Monitoring System and Actual Combat -- Advanced Prometheus Alarm Mechanism (15)
- 软技能之UML图
- npm npm
- UML diagram of soft skills
- 10年稳定性保障经验总结,故障复盘要回答哪三大关键问题?|TakinTalks大咖分享
- 三、mysql 存储引擎-建库建表操作
- 解决yolov5训练时出现:“AssertionError: train: No labels in VOCData/dataSet_path/train.cache. Can not train ”
- Chapter 11 Working with Dates and Times
猜你喜欢
随机推荐
Calculate the distance between two points
vscode hide menu bar
From 0 to 100: Notes on the Development of Enrollment Registration Mini Programs
小程序毕设作品之微信美食菜谱小程序毕业设计成品(7)中期检查报告
y84.第四章 Prometheus大厂监控体系及实战 -- prometheus告警机制进阶(十五)
小程序毕设作品之微信体育馆预约小程序毕业设计成品(4)开题报告
牛客多校4 A.Task Computing 思维
测试岗月薪5-9k,如何实现涨薪到25k?
npm npm
PHP算法之电话号码的字母组合
【C补充】链表专题 - 单向链表
联邦学习入门
域名重定向工具 —— SwitchHosts 实用教程
从0到100:招生报名小程序开发笔记
ping no reply
How do programmers solve online problems gracefully?
PAM Palindromic Automata
计算两点之间的中点
SRv6 L3VPN的工作原理
【SeaTunnel】从一个数据集成组件演化成企业级的服务








