@font-face???? ??
@font-face? ??? ?? ??? ???? ????? ??? ???? ???? ?? ??? ????? ??? ? ????.
??:
@font-face { font-family : 字體名稱; src : 字體文件在服務(wù)器上的相對(duì)或絕對(duì)路徑; }
??? ??? ? ?? ??? ???? ??? (font-*)?? ?? ???? ??? ? ????.
?:
p { font-size :12px; font-family : "My Font"; /*必須項(xiàng),設(shè)置@font-face中font-family同樣的值*/}
?:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>嵌入字體</title> <style type="text/css"> @font-face{ font-family: "myFont"; src: url("http://www.imooc.com/Amaranth-BoldItalic.otf"); } .demo { width: 340px; padding: 30px; color: #566F89; background: #000; font-size:58px; font-family: "myFont"; } </style> </head> <body> <div class="demo">myFont</div> </body> </html>
??: ??? ??: