css自定义字体完美解决方案example
2024-10-18 19:22:17
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>fontface</title>
<style type="text/css"> /*完美解决css3 web-safe字体各种浏览器兼容问题*/
@font-face {
font-family: 'myfont';/*定义字体名称*/
src: url('font/abandone-webfont.eot');/*兼容eot*/
src: url('font/abandone-webfont.eot?#iefix') format('embedded-opentype'),
url('font/abandone-webfont.woff2') format('woff2'),
url('font/abandone-webfont.woff') format('woff'),/*火狐支持woff,woff2,opentype字体*/
url('font/abandone-webfont.ttf') format('truetype'),/*基于webkit内核支持truetype字体*/
url('font/abandone-webfont.svg#abandoned_bitplaneregular') format('svg');
font-weight: normal;
font-style: normal;
font-stretch:ultra-expanded;/*定义字体符合拉伸*/
}
#ff{font-family:myfont; font-size: 50px;}
</style>
</head>
<body>
<p id="ff">css3,font css test123456</p>
</body>
</html>
字体格式转换推荐网站https://www.fontsquirrel.com/tools/webfont-generator
最新文章
- SVN合并操作实践
- 【leetcode】Minimum Window Substring (hard) ★
- c# 动态调用webserver
- PHP-PCRE正则表达式函数
- 九度OJ 1510 替换空格
- j2ee爬坑行之二 servlet
- tf–idf算法解释及其python代码实现(下)
- Grant的时候报错的解决:Access denied for user &;#39;root&;#39;@&;#39;localhost&;#39; (using password: YES)
- div套div 里面div有浮动 外面div自适应高度
- [分享]Host文件的原理解释及应用说明
- 201521123091 《Java程序设计》第6周学习总结
- 一 : springmvc常用注解
- LINUX下printf输出字体的特效
- PAT1017:Queueing at Bank
- (转)调用System.gc没有立即执行的解决方法
- JS输入框统计文字数量
- LeetCode(34):搜索范围
- MySQL mysqldump 数据备份
- 实验的方差分析(R语言)
- K8S 详细介绍