How to create a hover effect in a newsletter?

后端 未结 2 1283
迷失自我
迷失自我 2021-02-05 14:04

I\'m creating a newsletter, and i want to have panels that change background-color on mouse over.
Seeing as the newsletter wont have a head, I am defining all styles inline.

相关标签:
2条回答
  • 2021-02-05 14:17

    Have you checked these?

    http://www.campaignmonitor.com/css/

    http://www.hongkiat.com/blog/design-perfect-newsletter/

    The latter article says this:

    Hover effects are not supported in Outlook 2007/2010, Gmail, iOS or Android. You may still want to include the a:hover style for all supporting clients: Outlook 2000/2003, Hotmail, Apple Mail, and Yahoo! mail ...

    Javascript is a no-go. There is really no solution to this, some will accept :hover, some not. From that first link you can see which will and which will not.

    0 讨论(0)
  • 2021-02-05 14:41

    I you are certain your css will not be removed, you can use a hover and a background-color property

    .panel:hover {
        background-color: #EFEFEF;
    }
    

    Also it does not seem possible to use a pseudo-selector in an inline style, so that might be a stopper:

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