我正在为我的一个客户开发自定义电子邮件签名,我现在正处于 GMail、Hotmail、Brinkster 等的测试阶段。
我很难删除锚显示的下划线,我确实有“ text-decoration: none;” 在锚本身上,任何一个客户端都没有任何效果,但是 Outlook 呈现正常。
任何人都可以帮忙吗?:-)
I think your issue may be that certain clients move anchor styles and text into a span and apply the style definitions to that instead.
<a href="/" style="color:black;">hello, world!</a>
becomes
<a href="/"><span style="color:black;">hello, world!</span></a>
Not 100% sure why they do this, but it's annoying. Sometimes changing to something like this works:
<a href="/" style="color:black;" href="/"><span style="color:black;">hello, world!</span></a>
But it's still a mixed bag and changing all the time. Unfortunately the only way to confirm that things always look right is to use an image.
您也可以尝试添加!important
样式:
text-decoration: none !important;
<a href="example.com" style="text-decoration:none">link text</a>
除非其他地方有更高优先级的 css 规则,否则不会有下划线。