CSS/字体:修订间差异
来自康健生活
| 第57行: | 第57行: | ||
=== 引用字体跨域 === | === 引用字体跨域 === | ||
==== base64 编码 ==== | ==== base64 编码 ==== | ||
=== 动态引入 === | |||
方法一 | |||
<syntaxhighlight lang="css"> | |||
@font-face { /* 有多少个字体要写多少个“@font-face {}”块 */ | |||
font-family:; | |||
src: url('Coda.eot'); /* IE9 */ | |||
src: url('Coda.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ | |||
url('Coda.woff') format('woff'), /* Modern Browsers */ | |||
url('Coda.ttf') format('truetype'), /* Safari, Android, iOS */ | |||
url('Coda.svg#Coda') format('svg'); /* Legacy iOS */ | |||
}</syntaxhighlight> | |||
方法二 | |||
== 单位 == | == 单位 == | ||