FROM: https://developer.mozilla.org/ja/CSS/@font-face

http://nicewebtype.com/notes/2009/10/30/how-to-use-css-font-face/

http://www.w3.org/TR/css3-fonts/

代码

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 ="X-UA-Compatible" content ="IE=EmulateIE7" /> 5  < meta content ="text/html; charset=utf-8" http-equiv ="Content-Type" /> 6  < meta name ="Author" content ="涂聚文" /> 7  < meta name ="Keywords" content = "自定义字体 缔友计算机信息技术有限公司 捷为工作室 www.dupcit.com" /> 8  < meta name ="Description" content ="自定义字体 缔友计算机信息技术有限公司 捷为工作室" /> 9  < link rel ="shortcut icon" href ="http://www.dupcit.com/favicon.ico" type ="image/x-icon" /> 10  < link rel ="icon" href ="http://www.dupcit.com/favicon.ico" type ="image/ico" /> 11  12  < title > Web Font Sample CSS 自定义字体 </ title > 13  < style type ="text/css" media ="screen, print" > 14  @font-face { 15  font-family : "迷你繁篆书" ; 16  src : url("繁篆书.ttf") format("truetype") ; 17  } 18  19  body { font-family : "迷你繁篆书", serif ; 20  font-size : 45px ; 21  font-weight : bold ; 22  background : #000 url(black.png) ; 23  color : #fff ; 24  25  } 26  p { font : 28px 迷你繁篆书 ; } 27  h1 { font-family : 迷你繁篆书 } 28  29  </ style > 30  </ head > 31  < body > 32  < div style ="margin-left:auto;margin-right:auto; margin:0px 0px 0px 0px; text-align:center;" > 33  < p > 人生是一种心境, </ p >< p > 生活是一种艺术, </ p >< p > 成功是一种心态, </ p >< p > 幸福是一种感觉, </ p >< p > 竞争是一种建构, </ p >< p > 情感是一种整合, </ p >< p > 学习是一种成长. </ p >< p > ---Geovin Du </ p > 34  </ div ></ body > 35  </ html > 36  37 

中文字体格式*.EOT*.SVG*.WOFF难转换,有没有人知道的?

http://www.fontsquirrel.com/fonts/
http://typeface.neocracy.org/fonts.html
http://www.microsoft.com/typography/web/embedding/weft3/download.aspx  微软官方发布了一个WEFT工具,可以将TTF转化为EOF,只能英文字体

代码

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  4  < head > 5  < meta content ="text/html; charset=utf-8" http-equiv ="Content-Type" /> 6  < meta http-equiv ="X-UA-Compatible" content ="IE=EmulateIE7" /> 7  < meta http-equiv ="X-UA-Compatible" content ="IE=8" /> 8  < meta content ="text/html; charset=utf-8" http-equiv ="Content-Type" /> 9  < meta name ="Author" content ="涂聚文" /> 10  < meta name ="Keywords" content = "自定义字体 缔友计算机信息技术有限公司 捷为工作室 www.dupcit.com" /> 11  < meta name ="Description" content ="自定义字体 缔友计算机信息技术有限公司 捷为工作室" /> 12  < link rel ="shortcut icon" href ="http://www.dupcit.com/favicon.ico" type ="image/x-icon" /> 13  < link rel ="icon" href ="http://www.dupcit.com/favicon.ico" type ="image/ico" /> 14  15  < title > Web Font Sample CSS 自定义字体Internet Explorer,Firefox,Opera,Safari </ title > 16  < style type ='text/css' media ='screen' > 17  18  @font-face { 19  font-family : 'hakuyoxingshu7000Regular' ; 20  src : url('http://www.dupcit.com/font/7000.eot') ; 21  src : local('hakuyoxingshu7000 Regular'), 22  local('hakuyoxingshu7000'), 23  url('http://www.dupcit.com/font/7000.ttf') format('truetype'), 24  url('http://www.dupcit.com/font/7000.svg#hakuyoxingshu7000') format('svg') ; 25  } 26  div#poem,div#poem h3 { 27  font-size : 45px ; 28  font-family : hakuyoxingshu7000Regular!important ; 29  text-align : center ; 30  } 31  div#poem p { height : 30px ; line-height : 30px ; } 32  33  @font-face { 34  font-family : 'AquilineRegular' ; 35  src : url('http://www.dupcit.com/font/aquiline-webfont.eot') ; 36  src : local('http://www.dupcit.com/font/AquilineRegular'), url('http://www.dupcit.com/font/aquiline-webfont.woff') format('woff'), url('http://www.dupcit.com/font/aquiline-webfont.ttf') format('truetype'), url('http://www.dupcit.com/font/aquiline-webfont.svg#webfontG9rEeOrX') format('svg') ; 37  font-weight : normal ; 38  font-style : normal ; 39  } 40  h1 { font-family : AquilineRegular ; } 41  </ style > 42  43  </ head > 44  45  < body >< div style ="margin-left:auto;margin-right:auto; margin:0px 0px 0px 0px; text-align:center; background: #000 url(black.png); color:#ffffff;" > 46  < div id ="poem" > 47  < h3 > 云为素食 </ h3 > 48  < p > 京城有同窗,相约素食阁。 </ p > 49  < p > 听者犹未尽,言者语已多。 </ p > 50  < p > 满座皆友朋,畅谈何民科。 </ p > 51  < p > 禅中寄小语,慎言且柔和。 </ p > 52  </ div > 53  < h1 > ---Geovin Du </ h1 > 54  </ div > 55  </ body > 56  57  </ html > 58 

效果浏览: http://www.dupcit.com/11.html

http://www.dupcit.com/webfont/mnfzszi.html 支持客戶端瀏覽器(PC,手機)

字体转换

ttf to web font

http://font-to-web.com/convert-for-web/

ttc to ttf

http://www.fontconverter.org/

otf-to-ttf

https://cloudconvert.com/otf-to-ttf

转载于:https://www.cnblogs.com/geovindu/archive/2010/11/13/1876415.html

css 自定义字体 Internet Explorer,Firefox,Opera,Safari相关推荐

  1. 浏览器专属 CSS Hack:区分 Firefox / Opera / Safari / Internet Explorer

    浏览器专属 CSS Hack:区分 Firefox / Opera / Safari / Internet Explorer CSS Hack 是在标准 CSS 没办法兼容各浏览器显示效果时才会用上的 ...

  2. css自定义字体转换工具_5种最佳CSS3字体工具

    css自定义字体转换工具 自从将图形支持添加到浏览器以来,字体在网络上产生了最戏剧性的视觉影响. 几年前,不可能找到使用Arial,Verdana,Tahoma,Times New Roman或Geo ...

  3. [完美]原生JS获取浏览器版本判断--支持Edge,IE,Chrome,Firefox,Opera,Safari,以及各种使用Chrome和IE混合内核的浏览器...

    [完美]原生JS获取浏览器版本判断--支持Edge,IE,Chrome,Firefox,Opera,Safari,以及各种使用Chrome和IE混合内核的浏览器 原文:[完美]原生JS获取浏览器版本判 ...

  4. css字压,CSS自定义字体的实现,前端实现字体压缩

    CSS 自定义字体 移动端如何兼容UI给的字体 [toc] 移动端的默认字体 IOS 默认中文字体是Heiti SC 默认英文字体是Helvetica 默认数字字体是HelveticaNeue And ...

  5. html / CSS 自定义字体font 自己设置好看的特效字体

    这篇文章的主题是CSS3属性 : @font-face 楼主很喜欢CSS3的一些新增属性,给我们前端程序员带来了非常很多福利,我们的页面也可以做的更加的美观. 直接放效果图吧,因为代码较长,放在最下面 ...

  6. css自定义字体font-face的兼容和使用

    @Font-face目前浏览器的兼容性: Webkit/Safari(3.2+) TrueType/OpenType TT (.ttf) .OpenType PS (.otf): Opera (10+ ...

  7. html字体整体偏移,CSS自定义字体垂直偏移(错误?)

    ScottS.. 5 你可能没有做错任何事情.以下是一些可能适用的要点,有些可以由您控制,有些则不可以. 只是为了确定,明确设置vertical-align: baseline. 不同的文件(.eof ...

  8. 汽车之家 css自定义字体反爬解析

    本文主要是通过哦爬取汽车之家论坛一些用户热门精华帖子,介绍利用前端页面自定义字体的方式来实现反爬的技术手段,来实践破解它. 自定义字体:@font-face是CSS3中的一个模块,主要是实现将自定义的 ...

  9. CSS @font-face(CSS 自定义字体)

    转载自:http://www.2cto.com/kf/201312/265179.html @font-face可以实现从服务器端加载字体,所有浏览器中使用的字体就可以不受本地字体的限制.@font- ...

最新文章

  1. caffe windows 学习第一步:编译和安装(vs2012+win 64)
  2. 决策树Decision Tree 及实现
  3. Dynagen0.11+Pemuwrapper入手麻烦二三事——告诉初学者直路
  4. 阿里云ET工业大脑发布AI视觉产品“见远”:电池片、车辆、路面都能被“诊断”
  5. poj3249Test for Job(记忆化搜索)
  6. iphone文件怎么上传到服务器,iPhone编程中文件上传到HTTP服务器
  7. oracle克隆方式安装,克隆Oracle实现快速安装数据库软件
  8. Java 生成二维码实战
  9. linux 打开cgm软件,cgm文件扩展名,cgm文件怎么打开?
  10. Linux下Intel网卡固件烧写工具
  11. 怎么用html制作求职登记表,有步骤的编写个人简历 其效果更好
  12. InfluxDB在Win10安装与简单入门
  13. 【转载】mac读取ntfs硬盘方法
  14. _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv
  15. 【MM 容差】采购订单中的容差
  16. 联想计算机怎么设置硬盘,计算机设置硬盘启动的具体方法_如何在联想计算机上设置硬盘启动...
  17. Python中*args、**kws 理解与使用(可变参数以及关键字参数)
  18. Mysql出租车轨迹的分析_一种基于出租车轨迹数据的交通出行共现现象的可视化分析方法与流程...
  19. 抖抖口红机java版本_抖音全民口红机
  20. 从苏宁电器到卡巴斯基第11篇:我在苏宁电器当营业员 II

热门文章

  1. android 图片拼接工具,拼接工坊 - 这才是你需要拼接截图工具 - Android 应用 - 【最美应用】...
  2. VMware 虚拟机内部错误
  3. 计算机毕业设计 - SSM汽车故障报修管理系统(源码+论文)
  4. Android Notification详解
  5. centos su命令
  6. Dubbo-Adaptive实现原理
  7. python报考软考哪个比较好_软考中级考哪个比较好
  8. uniapp项目前端埋点实现方案
  9. node.js 内存泄露问题之解决
  10. Python框架Django快速入门