zoukankan      html  css  js  c++  java
  • css自定义字体完美解决方案example

     1 <!DOCTYPE html>
     2 <html lang="en">
     3 <head>
     4     <meta charset="UTF-8">
     5     <title>fontface</title>
     6     <style type="text/css">
     7 
     8         /*完美解决css3 web-safe字体各种浏览器兼容问题*/
     9         @font-face {
    10             font-family: 'myfont';/*定义字体名称*/
    11             src: url('font/abandone-webfont.eot');/*兼容eot*/
    12             src: url('font/abandone-webfont.eot?#iefix') format('embedded-opentype'),
    13             url('font/abandone-webfont.woff2') format('woff2'),
    14             url('font/abandone-webfont.woff') format('woff'),/*火狐支持woff,woff2,opentype字体*/
    15             url('font/abandone-webfont.ttf') format('truetype'),/*基于webkit内核支持truetype字体*/
    16             url('font/abandone-webfont.svg#abandoned_bitplaneregular') format('svg');
    17             font-weight: normal;
    18             font-style: normal;
    19             font-stretch:ultra-expanded;/*定义字体符合拉伸*/
    20         }
    21         #ff{font-family:myfont; font-size: 50px;}
    22     </style>
    23 </head>
    24 <body>
    25   <p id="ff">css3,font css test123456</p>
    26 </body>
    27 </html>

    字体格式转换推荐网站https://www.fontsquirrel.com/tools/webfont-generator

  • 相关阅读:
    hdu 2137
    hdu 2059
    hdu 2175
    hdu 1297
    hdu 1702
    hdu 1212
    hdu 1397
    [转]常见的碱性食品有哪些?
    [转]C#反射
    每个人都有自己的未来
  • 原文地址:https://www.cnblogs.com/wujindong/p/5326368.html
Copyright © 2011-2022 走看看