开发者

Is it possible to style a <button> like a <a>?

开发者 https://www.devze.com 2023-03-29 09:28 出处:网络
I have this code : button { } a:link, a:visited { text-decoration:none; color:red; } a:hover { text-decoration:underline;

I have this code :

button
{
}

a:link, a:visited
{
    text-decoration:none;
    color:red;
}

a:hover
{
    text-decoration:underline;
}

<button>Link Button</button>

<a href='#'>Link A</a>

is it possible on CSS h开发者_运维问答ave the same design of the <a> to the <button>? CSS 2 I hope, cross-browser on IE7+ and so on...


You just want the button to look like the link right?

http://jsfiddle.net/NcCVj/1/

The fonts are different but I think you get the gist of it. The key is setting background and border to none (or to whatever matches your link)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号