简体   繁体   中英

Change the colour of a hyperlink on an email address that is rendered in outlook html email

I have some C# code that inserts an email address into a placeholder in a html string (placeholder is in the format %Email%) and then sends this html as an email which is then opened using Outlook.

Basically I want the hyperlink colour to be white rather than the default blue.

I have tried to use CSS but not does not seem to work with the output in Outlook. I have also tried hard-coding the colour into html but still without luck. It seems that the default hyperlink colour is overriding the colour I hard-coded.

Any help with this would be greatly appreciated.

Thank you.

It's probably too late. Try putting the style on a span tag inside the a tag.

<a href="#" style="color: #fff;"><span style="color: #fff;">Link</span></a>

你尝试过内联样式吗?

<a href="#" style="color: #fff;">Link</a>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM