如何使HTML锚标记(或链接)看起来像按钮? [英] How to make an HTML anchor tag (or link) look like a button?

查看:31
本文介绍了如何使HTML锚标记(或链接)看起来像按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有此按钮图片:

I have this button image:

我想知道是否有可能做一个简单的

I was wondering whether it would be possible to make a simple

<a href="">some words</a> 

链接的样式和样式显示为该按钮?

and style that link to appear as that button?

如果可能的话,我该怎么做?

If it is possible, how do I do that?

推荐答案

使用CSS:

.button {
    display: block;
    width: 115px;
    height: 25px;
    background: #4E9CAF;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    line-height: 25px;
}

<a class="button">Add Problem</a>

http://jsfiddle.net/GCwQu/

这篇关于如何使HTML锚标记(或链接)看起来像按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆