We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第53天 怎么使用自定义字体?有什么注意事项?
The text was updated successfully, but these errors were encountered:
@font-face { font-family: '自定义字体名称'; src: url('字体文件名.eot'); /* IE9 Compat Modes / src: url('字体文件名.eot?#iefix') format('embedded-opentype'), / IE6-IE8 / url('字体文件名.woff') format('woff'), / Modern Browsers / url('字体文件名.ttf') format('truetype'), / Safari, Android, iOS / url('字体文件名.svg#字体文件名') format('svg'); / Legacy iOS */ font-style: normal; font-weight: normal; }
Sorry, something went wrong.
用法楼上已经说了,我补充一下注意事项: 这个方案对西文比较友好,因为西文字体体积较小,而中文基本都是10mb以上的,极度不友好。 故中文最好使用标准字体。或者根据用到的文字按需编写字库文件。
@font-face { font-family: '自定义字体名称'; src: url('字体文件名.eot'); /* IE9 Compat Modes / src: url('字体文件名.eot?#iefix') format('embedded-opentype'), / IE6-IE8 / url('字体文件名.woff') format('woff'), / Modern Browsers / url('字体文件名.ttf') format('truetype'), / Safari, Android, iOS / url('字体文件名.svg#字体文件名') format('svg'); / Legacy iOS */ font-style: normal; font-weight: normal; } 给相应的标签指定font-family,就可以使用你的自定义字体了
No branches or pull requests
第53天 怎么使用自定义字体?有什么注意事项?
The text was updated successfully, but these errors were encountered: