关于 asp.net:如何让任何 asp:LinkBut??ton 看起来像一个按钮 | 珊瑚贝

How to get any asp:LinkButton to look like a button


我想要一个看起来像标准按钮的超链接。我曾尝试使用 LinkBut??ton,但无法让它看起来像一个按钮。它似乎总是看起来像一个超链接。我不想设置图像来执行此操作。

有什么想法吗?

  • 为什么不直接使用 Asp:Button?


为此使用 css… 像

1
 

在这里你可以指定你自己的颜色

1
2
3
4
5
6
7
8
9
10
11
12
.buttonClass
{
    padding: 2px 20px;
    text-decoration: none;
    border: solid 1px Green;
    background-color: #ababab;
}
.buttonClass:hover
{
    border: solid 1px Black;
    background-color: #ffffff;
}

你可以通过css来实现。

1
</asp:LinkButton>

还在你的 css 中定义以下类。

1
.btn{ text-decoration:none; border:1px solid #000; }



这对我有用:

1
 

style=”text-decoration:none;” 用于删除下划线:
使用 href 属性

删除下划线


来源:https://www.codenong.com/3445903/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_10179.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?