【问题标题】:Remove underline from HTML [duplicate]从 HTML 中删除下划线 [重复]
【发布时间】:2019-01-16 16:35:54
【问题描述】:

我正在寻找如何从这段 HTML 中删除下划线

我试过了,但不知道把它放在这一行的什么地方。 (我不是开发者)

<a href="%%unsubscribe%%"><span style="color:#15BECE;">Unsubscribe</span></a> from email communications<br>

【问题讨论】:

  • a { 文字装饰:无; }
  • @Kelly Check this answer
  • 道歉 - 我不是开发人员。我将此位添加到我的 html 中,但它不起作用。我猜是因为我把它放在哪里?
  • 退订电子邮件通讯

标签: html


【解决方案1】:

谢谢大家!! 这是解决我问题的一点。我知道这是非常新手,感谢您的帮助!

<a style="text-decoration:none"><span style="color:#15BECE">Unsubscribe</span></a> from email communications</p>

【讨论】:

    【解决方案2】:

    您可以使用 CSS 来做到这一点。

    在您的.htm(或.html)文件的&lt;head&gt; 标记中,添加以下代码:

    <style>
        a {
            text-decoration: none;
        } 
    <style>
    

    要添加更多样式,您可以在标签上使用样式:

    <style>
        a:link {
            /*a normal <a> tag*/
            text-decoration: none;
            color: value;
        } 
    
        a:hover {
            text-decoration: underline;
            color: /*Your desired color when cursor is on the link*/;
        } 
    
        a:visited {
            text-decoration: none;
            color: /*Your desired color when link is clicked and visited*/;
        } 
    
        a:active {
            text-decoration: underline;
            color: /*Your desired color when link is clicked*/;
        } 
    <style>
    

    【讨论】:

    • 道歉 - 我不是开发人员。我将此位添加到我的 html 中,但它不起作用。我猜是因为我把它放在哪里?
    • 退订电子邮件通讯
    • 这是错误的方式来做你正在做的事情。首先,您的链接似乎是错误的
    • 你在使用&lt;span&gt;时也以内联方式使用了style
    • 您是否也已将此添加到您的&lt;head&gt; 标签中?能否请您提供指向您网站的链接,以便我在那里查看?
    猜你喜欢
    • 2021-03-08
    • 1970-01-01
    • 1970-01-01
    • 2016-05-14
    • 2015-02-26
    • 2016-04-23
    • 2019-11-25
    • 2011-04-26
    • 1970-01-01
    相关资源
    最近更新 更多