【发布时间】:2014-06-28 20:42:57
【问题描述】:
我正在学习本教程:
http://www.hongkiat.com/blog/css3-on-off-button/
我希望一切都一样,除了我想改变:
<section>
<a rel="external" href="#button" id="button"></a>
<span></span>
</section>
到:
<section>
<asp:Button CssClass="button" id="Button3" runat="server" OnClick="Button3_Click" Text=""\uf011;"" />
<span></span>
</section>
因为添加按钮然后对其进行编程更简单。一切正常,只是当我单击按钮时它不会变成白色并且红点不会变成绿色,我想这是因为在教程中按钮用作链接,如果我用 Visual Studio 添加它不是一个链接,我该怎么做,即使我用 Visual Studio 添加它,我也会像这样设置按钮的样式。
【问题讨论】:
-
将其更改为使用您的 css 类名称(按钮)而不是锚标记