Home > Web Front-end > HTML Tutorial > The style of ButtonEnabled='false' attribute under FireFox does not work_html/css_WEB-ITnose

The style of ButtonEnabled='false' attribute under FireFox does not work_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:16:18
Original
1161 people have browsed it

CSS code:

 <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    <title></title>    <style type="text/css">        .border0        {            color: blue;            border: 0;            background-color: transparent;        }    </style></head><body>    <form id="form1" runat="server">        <div>            <asp:Button ID="btnTest" runat="server" Text="点击测试" Enabled="false" CssClass="border0" />            <asp:Button ID="Button1" runat="server" Text="点击测试" CssClass="border0" />        </div>    </form></body></html>
Copy after login

The display effect is inconsistent under IE9 and Firefox. IE9 is correct. Under Firefox, the Enabled="false" style effect does not work. The button is indeed unavailable, but it does not need to be grayed out. .
I don’t know how to make the picture. You can just copy the code. I hope experienced experts can solve it. Thank you


Reply to the discussion (solution)

<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    <title></title>    <style type="text/css">        .border0        {            color: blue;            border: 0;            background-color: transparent;        }        .border1[disabled="disabled"]        {            color: gray;            border: 0;            background-color: transparent;        }        .F        {            color: red;        }    </style></head><body>    <form id="form1" runat="server">        <div>            <asp:Button ID="btnTest" runat="server" Text="点击测试" Enabled="false" CssClass="border0 border1" />            <asp:Button ID="Button1" runat="server" Text="点击测试" CssClass="border0 border1" />            <asp:Button ID="Button2" runat="server" Text="点击测试" Enabled="false" CssClass="F border1" />        </div>    </form></body></html>
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template