@font-face 下拉列表在 ie8 中不起作用

发布于 2024-12-06 10:34:40 字数 1309 浏览 2 评论 0原文

在使用 @font-face 时,我面临一个问题,即当我要将字体从印地语转换为英语时,这在每个数据控件的每个浏览器中都运行良好。但对于下拉列表,这在 IE8 中不好,但在其他浏览器中很好。我按以下方式使用它:

1)在 app_theme 文件夹中

@font-face
{
    font-family: "MyCustomFont";
    src: url('../font/MFDEV010.ttf') format('truetype')
}
@font-face
{
    font-family: "MyFont";
    src: url('../font/MFDEV010.eot?iefix') format('eot')

}

.HindiSkin
{
    font-family: "MyFont", "MyCustomFont";
    font-size:17px;

}
.EngSkin
{
    font-family: Arial Unicode MS ;
    font-size:15px;

}

.InputSelect
{
   /*border: 1px solid #b0b0b0;*/
   font-family: verdana;
   font-size: 12px;
   color: #090908;
   font-weight: normal;
   width: 190px;
   padding:1px;
   height:25px;
}

.InputSelectHindi
{
   /*border: 1px solid #b0b0b0;*/
   font-family: "MyCustomFont","MyFont";
   font-size: 18px;
   color: #090908;
   font-weight: normal;
   width: 190px;
   padding:1px;
   height:30px;
}  

2)在皮肤文件中我包括:

<asp:DropDownList runat="server" cssclass="InputSelect" />
<asp:DropDownList SkinID="Blue" runat="server" cssclass="InputSelectHindi" />

3)在页面上

on the page i have add the reference of the theme here like this:
StylesheetTheme="EnglishFontSkin"

注意:这工作正常除IE8外,所有地方都可以,请给出解决方案。 提前谢谢

While using @font-face I am facing a problem that is when I am going to convert the font from hindi to english, this is working fine in each and every browser for each datacontrol. but for dropdownlist this is not good in IE8 but fine in other browsers.I am using it in the following way:

1) in app_theme folder

@font-face
{
    font-family: "MyCustomFont";
    src: url('../font/MFDEV010.ttf') format('truetype')
}
@font-face
{
    font-family: "MyFont";
    src: url('../font/MFDEV010.eot?iefix') format('eot')

}

.HindiSkin
{
    font-family: "MyFont", "MyCustomFont";
    font-size:17px;

}
.EngSkin
{
    font-family: Arial Unicode MS ;
    font-size:15px;

}

.InputSelect
{
   /*border: 1px solid #b0b0b0;*/
   font-family: verdana;
   font-size: 12px;
   color: #090908;
   font-weight: normal;
   width: 190px;
   padding:1px;
   height:25px;
}

.InputSelectHindi
{
   /*border: 1px solid #b0b0b0;*/
   font-family: "MyCustomFont","MyFont";
   font-size: 18px;
   color: #090908;
   font-weight: normal;
   width: 190px;
   padding:1px;
   height:30px;
}  

2) in the skin file i have include:

<asp:DropDownList runat="server" cssclass="InputSelect" />
<asp:DropDownList SkinID="Blue" runat="server" cssclass="InputSelectHindi" />

3) on the page

on the page i have add the reference of the theme here like this:
StylesheetTheme="EnglishFontSkin"

Note: this is working fine everywhere but not IE8, please give the solution for it.
thnx in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

厌倦 2024-12-13 10:34:40

IE 不支持 font-face 中的 TTF 格式(根据此页面)。也许这就是原因?

IE doesn't support TTF format in font-face (acording to this page). Maybe that's the reason?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文