在css中使用自定义字体
来源:互联网 发布:世界征服者3 mac 编辑:程序博客网 时间:2024/05/29 03:54
使用css3的#font-face属性
@font-face { font-family: <YourWebFontName>; src: <source> [<format>][,<source> [<format>]]*; [font-weight: <weight>]; [font-style: <style>]; }
下面是我使用SourceCodePro的配置。(首先要把字体文件放进去)
@font-face { font-family: 'SourceCodePro'; src: url('./assets/font/SourceCodePro.eot'); src: url('./assets/font/SourceCodePro.eot?#iefix') format('embedded-opentype'), url('./assets/font/SourceCodePro.woff') format('woff'), url('./assets/font/SourceCodePro.ttf') format('truetype'); font-weight: normal; font-style: normal;}
如果我们想定义某种字体的多种样式,可以配合sass使用,效果更好。
0 0
- 在css中使用自定义字体
- 在iphone中使用自定义字体
- 在ANDROID中使用自定义字体
- 在iphone中使用自定义字体
- 在iPhone应用中使用自定义字体
- 在iPhone应用中使用自定义字体
- 在iPhone应用中使用自定义字体
- 在iPhone应用中使用自定义字体
- 如何在iPhone中使用自定义字体
- 如何在工程中使用自定义字体
- 在iOS开发中使用自定义字体
- 在Kivy中使用自定义的字体
- 在iOS开发中使用自定义字体
- 在iOS开发中使用自定义字体
- 在Android中使用自定义字体
- 在Android O中使用自定义字体
- 在Android O中使用自定义字体
- 使用CSS在页面中嵌入字体(多种字体文件格式)
- 需要学习和了解的技术
- 系统函数-文件操作-truncate()
- gulp任务编写——拷贝文件
- spark on yarn 的运行模式
- 运用snapcraft 2.25+提供的hooks来实现对snap的设置
- 在css中使用自定义字体
- 设计模式之禅笔记3
- 利用runtime追踪对象的每一个方法
- angular2中将带标签的文本输出在页面上
- 常用 Git 命令清单
- html5(二)canvas绘图渐变
- 系统函数-文件操作-unlink()
- fullpage.js学习笔记
- git