html怎么压缩ttf,如何使用CSS包含.ttf字体?
我的代碼有問題。因為我要為頁面包括全局字體,所以我下載了.ttf文件。我將其包含在我的主要CSS中,但是我的字體不會改變。
這是我的簡單代碼:
@font-face {
font-family: 'oswald';
src: url('/font/oswald.regular.ttf');
}
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin:0;
padding:0;
border:0;
font-size:100%;
font:inherit;
font-family: oswald;
vertical-align:baseline
}
我不知道我哪里出了錯。你能幫我嗎?謝謝。
總結(jié)
以上是生活随笔為你收集整理的html怎么压缩ttf,如何使用CSS包含.ttf字体?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android 优化启动事件,张绍文an
- 下一篇: android 9patch 漏洞,An