我有一个 asp:Button,我在 asp:Button 中使用了带有 cssClass 属性的 css 样式,但这些样式不起作用。
这是我的 asp 按钮:
<tr>
<td>
<div class="form_row">
<asp:Button ID="ButtonSend" CssClass="BtnSend" runat="server" Text="Send" OnClick="ButtonSend_Click" />
</div>
</td>
</tr>
这是我的 CSS:
.BtnSend {
width: 53px;
height: 24px;
display: block;
float: right;
margin: 0 0 0 10px;
background: url(../../Images/contact_bt.gif) no-repeat center;
text-decoration: none;
text-align: center;
line-height: 24px;
color: #fff;
}
如果我没记错的话,我应该使用这样的东西:
input[type="submit"]
{
//css coding
}
但我不知道把它放在哪里以及如何只影响这个按钮。
最佳答案
根据您的评论,在您的 CSS 中添加/更改它:
.BtnSend {
border: none;
background: transparent url(../../Images/contact_bt.gif) no-repeat center;
}
关于c# - 样式 <asp :Button/> with CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22174016/