Mobile Safari/ iPhone Mail.app HTML design issues: prevent autolinking and styling auto-links (dates, addresses, etc.)

前端 未结 9 749
我在风中等你
我在风中等你 2020-12-08 07:40

i am trying to design an HTML e-mail that should also look good when it is read on mobile devices. My biggest problems are with the iPhone (iOS 4): its mostly undocumented \

相关标签:
9条回答
  • 2020-12-08 08:15

    I use this solution for auto links that need to be styled

    <span class="applelinksWhite">or call 1-666-12<span>3-456</span>7</span>
    

    Then, I add this to my style tag. I use it in the body as some clients strip it from the head.

    .applelinksWhite a {color:#ffffff !important; text-decoration:none;}
    

    So the applelinks span covers ios devices' auto linking, and I throw in a basic span in the middle of the text string to throw off other clients like gmail. Tested in Litmus and working across the board.

    This works for any kind of auto links.

    0 讨论(0)
  • 2020-12-08 08:16

    For dates & addresses, you could disrupt the data recognition pattern matching by inserting e.g. a zero width entity. E.g.,

    M&#x200b;arch 30, 2013
    

    Tested on iOS Mail 4.3 and 6.0.

    0 讨论(0)
  • 2020-12-08 08:22
    <a href="#" style="color: #666666; text-decoration: none;pointer-events: none;">Boca Raton, FL 33487</a>
    

    Change the color to whatever matches your text, text decoration removes the underline, pointer events stops it from being viewed like a link in a browser

    This is perfect for HTML emails on ios and browser.

    0 讨论(0)
提交回复
热议问题