-1

@font-face を初めて使用しようとしましたが、機能しません 誰かこの問題を解決するのを手伝ってくれませんか なぜこのスクリプトが機能しないのですか

<style>
    @font-face{ 
        font-family: myfont;
        src: url('entypo.eot');
        src: url('entypo.eot?iefix') format('eot'),
             url('entypo.woff') format('woff'),
             url('entypo.ttf') format('truetype'),
             url('entypo.svg#helvetica') format('svg');
        font-weight: normal;
        font-style: normal;
    }

    div {
        font-family: myfont;
    }
</style>

 </head>
 <body>
     <div>
          sdfdfdsfsdf
     </div>
4

4 に答える 4

0

これを試して

@font-face
{
    font-family: 'SegoeUI';
    src: url('Fonts/segoeui.eot');
    src: url('Fonts/segoeui.eot?#iefix') format('embedded-opentype'), url('fonts/segoeui.ttf') format('truetype');
}

@font-face
{
    font-family: 'SegoeLight';
    src: url('Fonts/segoeuil.eot');
    src: url('Fonts/segoeuil.eot?#iefix') format('embedded-opentype'), url('fonts/segoeuil.ttf') format('truetype');
}
于 2013-02-20T06:49:13.973 に答える
0

あなたのフォントは英語のフォントではないと思いますよね?とりあえず。私はペルシャ語のフォントを使用していて、時々動かないので、この問題に何度も直面しました! 私がしているのは、オンライン フォント コンバーターなどのさまざまなソフトウェアを使用して、それらをさまざまなフォント形式に再変換することです。時々、私のフォントは IE や Firefox では動作しますが、chrome では動作しません! そして、それらを再変換すると、すべてが正常に変わります! それらを再変換すると問題が解決する場合があります。PS: そのようなことを行うためのいくつかのクールなサイト:
font face generator
font 2 web

于 2013-02-20T07:02:18.867 に答える