һ
 ע

QQ¼

ֻһٿʼ

ƼĶ

+
̳ WEBҳǰ뿪 ҳ

[Html] ҳʹһЩ壿

[]
8970 happy175 2013-8-30 17:31:31
| ʾȫ¥
1F

ϵ½עᣬύѣø๦ܣϴزIJޣ

Ҫ ¼ ſػ鿴ûʺţע  

x
Ϊҳʦ֪ҳеHTMLִ඼ѡһЩ壬ȣΪЩڶжбװȻһЩĻһ㶼ὫЩתΪͼƬԭҲʹõĺܶвڡʵֲѣƼķʮֹãͨCSSеURLԽҪõͨҳȡʹߵĵжȡͨ÷ʹκҪõ塣

ʹҳвɻȱһ֡أϣҳʹijһض壬Ǹ岢ϵͳ壬ûҳʱпܿʵơʦİ취ǰҪͼƬмȱݣ1. ܴΧʹø壻2. ͼƬʹֲ޸ģ3. վSEO治ὫͼƬaltΪжҳԵЧأһЩʹsIFRjavascript/flash hackķʵȱݡҪֻͨCSS@font-faceʵҳǶ塣

һ

ȡҪʹļʽȷжʾ塣

.TTF.OTFFirefox 3.5SafariOpera
.EOTInternet Explorer 4.0+
.SVGChromeIPhone
ҪλȡijָʽļһأͷϣԴվѾҵиijָʽļ.TTFļҪͨļʽתΪļʽļʽתͨվFontsQuirrelonlinefontconverterṩתȡƼһվ㣬ѡҪַļڷһѡʹļĴСʹñʵԡ

ڶ

ȡָʽļһҪʽ壬Ҫĵطʹø塣

£
  1. @font-face {
  2. font-family: 'fontNameRegular';
  3. src: url('fontName.eot');
  4. src: local('fontName Regular'),
  5.               local('fontName'),
  6.               url('fontName.woff') format('woff'),
  7.               url('fontName.ttf') format('truetype'),
  8.               url('fontName.svg#fontName') format('svg');
  9. }  
  10. /*fontName滻Ϊ*/
ƴ

ҳҪĵطʹø壺
  1. p { font: 13px fontNameRegular, Arial, sans-serif; }
  2. h1{font-family: fontNameRegular}
ƴ

  1. <p style=font-family: fontNameRegular>ˮ֣仨</p>
ƴ
  1. <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
  2. <html xmlns=http://www.w3.org/1999/xhtml>
  3. <head>
  4. <meta http-equiv=Content-Type content=text/html; charset=utf-8 />
  5. <title>ҳǶ - CSS9.NET</title>
  6. <link rel=stylesheet href=/upimg/allimg/091209/style.css />
  7. <style type=text/css>
  8. @font-face {
  9. font-family: 'hakuyoxingshu7000Regular';
  10. src: url('/upimg/allimg/091209/7000.eot');
  11. src: local('hakuyoxingshu7000 Regular'), local('hakuyoxingshu7000'), url('/upimg/allimg/091209/7000.ttf') format('truetype'), url('http://www.blueidea.com/articleimg/2009/12/7263/7000.svg#hakuyoxingshu7000') format('svg');
  12. }
  13. #poem{
  14. font-size:45px;
  15. font-family:hakuyoxingshu7000Regular;
  16. text-align:center;
  17. }
  18. #poem p{height:30px;line-height:30px;}
  19. </style>
  20. </head>
  21. <body>
  22. <div id=testdiv>
  23. <h1>ҳǶ - CSS9.NET</h1>
  24. <h2>ԭģ <a href=http://css9.net/css-font-face-solution/ _fcksavedurl=http://css9.net/css-font-face-solution/>http://css9.net/css-font-face-solution/</a>   עWebǰ˿ - <a href=http://css9.net _fcksavedurl=http://css9.net>CSS9.NET</a></h2>
  25. <div id=poem>
  26. <h3>Ϊʳ</h3>
  27. <p>ͬԼʳ</p><p>δѶࡣ</p><p>󣬳̸ơ</p><p>мС͡</p>
  28. </div>
  29. </body>
  30. </html>
ƴ

Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ
б

ֹ

²

̳¡ͼƬѷϴվԭתԻ,µİȨԭ
վַİȨ֪ͨǵĹԱ,Ա(Email:admin@websjy.com)ʱȡȨɾ
ܾκκʽڱ̳л񹲺͹ִ!

QQ| 42011102000510|Archiver|ֻ|Դ ( ICP14013341-1

GMT+8, 2018-5-22 12:18

Powered by Discuz! X3.2

ԴԴվ  ԴAPPӦ֮

ٻظ ض б