[英]ASP.net Button with CssClass not working
Problem: 问题:
I have two ASP.net Buttons
that work fine in the Chrome and Firefox browser but not in IE 9.0. 我有两个ASP.net Buttons
可以在Chrome和Firefox浏览器中正常工作,但不能在IE 9.0中正常工作。
*Does not work on IE 9.0*
<asp:Button ID="btnMeal" runat="server" onclick="btnMeal_Click" Text="." CssClass="buttonmeal" />
*Works fine on IE 9.0 and other browsers*
<asp:Button ID="btnType" runat="server" onclick="btnType_Click" Text="." CssClass="button"/>
CSS Code: CSS代码:
/*Doesnt work*/
.buttonmeal
{
background: url('../images/meal.png') no-repeat;
width:82px;
height:32px;
border:0px;
}
/*Works*/
.button
{
background: url('../images/type.png') no-repeat;
width:82px;
height:32px;
border:0px;
}
Maybe I think the problem is because it renders in IE differently and only button is used in IE. 也许我认为问题是因为它在IE中呈现的方式有所不同,而IE中仅使用了按钮。
<td class="myStyle">
<input type="button" name="select" ...>
</td>
Most likely a caching issue (it was for me anyway). 最有可能是一个缓存问题(无论如何对我来说)。 There's a good change your browser is not using the newest version of your CSS file. 您的浏览器未使用CSS文件的最新版本,这是一个不错的变化。 Try a hard refresh: 尝试重新整理:
Chrome / IE / Firefox : Ctrl + R Chrome / IE / Firefox : Ctrl + R
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.