如何使 html 链接看起来像一个按钮? [英] How do I make an html link look like a button?
本文介绍了如何使 html 链接看起来像一个按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是 ASP.NET,我的一些按钮只是做重定向.我宁愿它们是普通的链接,但我不希望我的用户注意到外观上的太大差异.我考虑过由锚点(即标签)包裹的图像,但我不想每次更改按钮上的文本时都必须启动图像编辑器.
I'm using ASP.NET, some of my buttons just do redirects. I'd rather they were ordinary links, but I don't want my users to notice much difference in the appearance. I considered images wrapped by anchors, i.e. tags, but I don't want to have to fire up an image editor every time I change the text on a button.
推荐答案
应用这个类
.button {
font: bold 11px Arial;
text-decoration: none;
background-color: #EEEEEE;
color: #333333;
padding: 2px 6px 2px 6px;
border-top: 1px solid #CCCCCC;
border-right: 1px solid #333333;
border-bottom: 1px solid #333333;
border-left: 1px solid #CCCCCC;
}
<a href="#" class="button">Example</a>
这篇关于如何使 html 链接看起来像一个按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文