html - 删除 URL 中的下划线 [text-decoration : none; doesn't work]

标签 html css

我想删除下划线。我已经放置了 text-decoration: none;。但是它不起作用。这是一个 DEMO .

HTML

<a href="./index.php?sign_in=1">
    <div id="signup_button">
        Sign up
    </div>
</a>

CSS

#signup_button {
    position: relative;
    max-width: 206px;
    min-height: 20px;
    max-height: 40px;
    margin: auto;
    margin-top: 10px;
    padding: 10px 10px 10px 10px;
    background-color: #0096cc;
    text-align: center;
    color:#fff;
    font: 35px/1 "Impact";
    text-decoration: none;
}

最佳答案

设置

a {
    text-decoration:none;
}

在你的风格之前。下划线来自那里。

关于html - 删除 URL 中的下划线 [text-decoration : none; doesn't work],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19005005/

相关文章:

javascript - 无法使用 tableExport 将表导出到 Excel

css - 为什么 table::after 元素是在 table > td 元素之后创建的,而不是 table 元素?

jquery - 在链接上禁用悬停,背景图像悬停效果会导致闪烁

javascript - CSS 转换在转换为 React 代码 : 时停止运行

javascript - 悬停效果在 Safari 中第二次不起作用

html - 浏览器与 IE 7 及以下版本的兼容性

javascript - 可以在 getElementById 中使用通配符吗?

html - 如何能够在没有文本的情况下显示 Table TD

javascript - jQuery Accordion 。单击较高部分的内容可打开较低部分

css - IE z-index 和位置问题