@font-face 下拉列表在 ie8 中不起作用
在使用 @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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IE 不支持 font-face 中的 TTF 格式(根据此页面)。也许这就是原因?
IE doesn't support TTF format in font-face (acording to this page). Maybe that's the reason?