如何让白色背景在移动和 gmail/outlook 深色模式下保持白色 - 电子邮件 HTML CSS

问题描述 投票:0回答:0

我遇到背景消失的问题 - 不是反转,只是完全透明。它发生在移动设备上的 Gmail、Outlook 上,似乎也发生在桌面深色模式的 Outlook 上。

我尝试过将颜色更改为背景图像,但没有成功 尝试制作该行的整个移动版本,但没有成功

更新:下面的代码似乎修复了移动菜单栏,但没有修复 gmail 或 Outlook 问题,并且页脚栏在移动设备上仍然反转

请参阅下面的电子邮件代码:

菜单标题栏:

<table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-2" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
                <tbody>
                    <tr>
                        <td>
                        <table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #fff; background-image: url(https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/Header%20Background.png); background-repeat: no-repeat; background-size: cover; border-bottom: 5px solid #06f; border-radius: 0; width: 600px; margin: 0 auto;" width="600">
                            <tbody>
                                <tr>
                                    <td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; text-align: left; font-weight: 400; padding-bottom: 20px; padding-left: 20px; padding-right: 10px; padding-top: 20px; vertical-align: middle; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="66.66666666666667%">
                                    <table border="0" cellpadding="20" cellspacing="0" class="image_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
                                        <tbody>
                                            <tr>
                                                <td class="pad">
                                                <div align="left" class="alignment" style="line-height:10px"><a href="https://blackbull.com" style="outline:none" tabindex="-1" target="_blank"><img class="fullWidth" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/rebrand-BB_full-logo.png" style="height: auto; display: block; border: 0; max-width: 167px; width: 100%;" width="167"></a></div>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    </td>
                                    <td class="column column-2" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; text-align: left; font-weight: 400; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; vertical-align: middle; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="20%">
                                    <table border="0" cellpadding="5" cellspacing="0" class="button_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
                                        <tbody>
                                            <tr>
                                                <td class="pad">
                                                <div align="center" class="alignment"><!--[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://secure.blackbull.com/" style="height:28px;width:62px;v-text-anchor:middle;" arcsize="18%" stroke="false" fillcolor="#ffffff"><w:anchorlock/><v:textbox inset="0px,0px,0px,0px"><center style="color:#000000; font-family:sans-serif; font-size:15px"><![endif]--><a href="https://secure.blackbull.com/" style="text-decoration:none;display:inline-block;color:#000000;background-color:#ffffff;border-radius:5px;width:auto;border-top:0px solid transparent;font-weight:600;border-right:0px solid transparent;border-bottom:0px solid transparent;border-left:0px solid transparent;padding-top:5px;padding-bottom:5px;font-family:'Readex Pro','Arial';font-size:15px;text-align:center;mso-border-alt:none;word-break:keep-all;white-space: nowrap;" target="_blank"><span style="padding-left:10px;padding-right:10px;font-size:15px;display:inline-block;letter-spacing:normal;"><span style="word-break: break-word; line-height: 18px; white-space: nowrap">Login</span></span></a><!--[if mso]></center></v:textbox></v:roundrect><![endif]--></div>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    </td>
                                    <td class="column column-3" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; text-align: left; font-weight: 400; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; vertical-align: middle; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="20%">
                                    <table border="0" cellpadding="5" cellspacing="0" class="button_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
                                        <tbody>
                                            <tr>
                                                <td class="pad">
                                                <div align="center" class="alignment"><!--[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://secure.blackbull.com/dashboard/wallet/add-funds?lang=en" style="height:28px;width:57px;v-text-anchor:middle;" arcsize="18%" stroke="false" fillcolor="#ffffff"><w:anchorlock/><v:textbox inset="0px,0px,0px,0px"><center style="color:#000000; font-family:sans-serif; font-size:15px"><![endif]--><a href="https://secure.blackbull.com/dashboard/wallet/add-funds?lang=en" style="text-decoration:none;display:inline-block;color:#000000;background-color:#ffffff;border-radius:5px;width:auto;border-top:0px solid transparent;font-weight:600;border-right:0px solid transparent;border-bottom:0px solid transparent;border-left:0px solid transparent;padding-top:5px;padding-bottom:5px;font-family:'Readex Pro','Arial';font-size:15px;text-align:center;mso-border-alt:none;word-break:keep-all;" target="_blank"><span style="padding-left:10px;padding-right:10px;font-size:15px;display:inline-block;letter-spacing:normal;"><span style="word-break: break-word; line-height: 18px;white-space: nowrap;">Fund</span></span></a><!--[if mso]></center></v:textbox></v:roundrect><![endif]--></div>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>

更多问题请联系我们吧:

<table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-7 mobile_hide" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-size: auto;" width="100%">
                <tbody>
                    <tr>
                        <td>
                        <table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #000; background-color: #1a58d3; background-image: url(https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/question%20section%20backdrop.png); background-repeat: no-repeat; background-size: cover; border-radius: 0; width: 600px; margin: 0 auto;" width="600">
                            <tbody>
                                <tr>
                                    <td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; text-align: left; font-weight: 400; padding-bottom: 50px; padding-left: 45px; padding-right: 20px; padding-top: 50px; vertical-align: middle; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="41.666666666666664%">
                                    <table border="0" cellpadding="0" cellspacing="0" class="paragraph_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%">
                                        <tbody>
                                            <tr>
                                                <td class="pad">
                                                <div style="color:#fff;direction:ltr;font-family:'Readex Pro','Arial';font-size:19px;font-weight:600;letter-spacing:0px;line-height:120%;text-align:left;mso-line-height-alt:22.8px;">
                                                <p style="margin: 0;"><strong>Any questions?</strong><br>
                                                <strong>Get in touch.</strong></p>
                                                </div>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    </td>
                                    <td class="column column-2" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; text-align: left; font-weight: 400; padding-bottom: 5px; padding-top: 5px; vertical-align: middle; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="58.333333333333336%">
                                    <table border="0" cellpadding="0" cellspacing="0" class="icons_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
                                        <tbody>
                                            <tr>
                                                <td class="pad" style="vertical-align: middle; color: #000000; font-family: inherit; font-size: 14px; letter-spacing: 0px; padding-bottom: 35px; padding-left: 20px; padding-right: 20px; padding-top: 35px; text-align: right;">
                                                <table align="right" cellpadding="0" cellspacing="0" class="alignment" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
                                                    <tbody>
                                                        <tr>
                                                            <td style="vertical-align: middle; text-align: center; padding-top: 10px; padding-bottom: 10px; padding-left: 10px; padding-right: 15px;" class=""><a href="tel:+6495585142" style="text-decoration: none;" target="_self"><img align="center" class="icon" height="32" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/call-us-32.png" style="height: auto; display: block; margin: 0 auto; border: 0;" width="32"></a></td>
                                                            <td style="vertical-align: middle; text-align: center; padding-top: 10px; padding-bottom: 10px; padding-left: 15px; padding-right: 15px;" class=""><a href="https://blackbull.com/en/" style="text-decoration: none;" target="_self"><img align="center" class="icon" height="32" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/live_chat-32.png" style="height: auto; display: block; margin: 0 auto; border: 0;" width="32"></a></td>
                                                            <td style="vertical-align: middle; text-align: center; padding-top: 10px; padding-bottom: 10px; padding-left: 15px; padding-right: 15px;" class=""><a href="https://blackbull.com/en/" style="text-decoration: none;" target="_self"><img align="center" class="icon" height="32" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/visit-web-32.png" style="height: auto; display: block; margin: 0 auto; border: 0;" width="32"></a></td>
                                                            <td style="vertical-align: middle; text-align: center; padding-top: 10px; padding-bottom: 10px; padding-left: 15px; padding-right: 10px;" class=""><a href="mailto:[email protected]?subject=" style="text-decoration: none;" target="_self"><img align="center" class="icon" height="32" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/mail-32.png" style="height: auto; display: block; margin: 0 auto; border: 0;" width="32"></a></td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>

            <table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-8 desktop_hide" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; mso-hide: all; max-height: 0; display: none; overflow: hidden; background-size: auto;" width="100%">
                <tbody>
                    <tr>
                        <td>
                        <table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; mso-hide: all; max-height: 0; display: none; overflow: hidden; color: #000; background-color: #06f; background-size: auto; border-radius: 0; width: 600px; margin: 0 auto;" width="600">
                            <tbody>
                                <tr>
                                    <td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; text-align: left; font-weight: 400; padding-bottom: 30px; padding-left: 45px; padding-right: 20px; padding-top: 30px; vertical-align: top; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%">
                                    <table border="0" cellpadding="0" cellspacing="0" class="paragraph_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word; mso-hide: all; max-height: 0; display: none; overflow: hidden;" width="100%">
                                        <tbody>
                                            <tr>
                                                <td class="pad">
                                                <div style="color:#fff;direction:ltr;font-family:'Readex Pro','Arial';font-size:19px;font-weight:600;letter-spacing:0px;line-height:120%;text-align:left;mso-line-height-alt:22.8px;">
                                                <p style="margin: 0;">Any Questions?<br>
                                                Get in touch.</p>
                                                </div>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>

            <table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-9 desktop_hide" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; mso-hide: all; max-height: 0; display: none; overflow: hidden; background-size: auto;" width="100%">
                <tbody>
                    <tr>
                        <td>
                        <table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; mso-hide: all; max-height: 0; display: none; overflow: hidden; color: #000; background-color: #000; background-image: url(https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/blackbackground.png); background-repeat: no-repeat; background-size: cover; border-radius: 0; width: 600px; margin: 0 auto;" width="600">
                            <tbody>
                                <tr>
                                    <td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; text-align: left; font-weight: 400; background-color: #000000; padding-bottom: 30px; padding-left: 45px; padding-right: 20px; padding-top: 30px; vertical-align: top; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%">
                                    <table border="0" cellpadding="0" cellspacing="0" class="icons_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; mso-hide: all; max-height: 0; display: none; overflow: hidden;" width="100%">
                                        <tbody>
                                            <tr>
                                                <td class="pad" style="vertical-align: middle; color: #000000; font-family: inherit; font-size: 14px; font-weight: 400; padding-bottom: 35px; padding-left: 20px; padding-right: 20px; padding-top: 35px; text-align: center;">
                                                <table align="center" cellpadding="0" cellspacing="0" class="alignment" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; mso-hide: all; max-height: 0; display: none; overflow: hidden;">
                                                    <tbody>
                                                        <tr>
                                                            <td style="vertical-align: middle; text-align: center; padding-top: 10px; padding-bottom: 10px; padding-left: 10px; padding-right: 15px;" class=""><a href="+6495585142" style="text-decoration: none;" target="_self"><img align="center" class="icon" height="32" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/call-us-32.png" style="height: auto; display: block; margin: 0 auto; border: 0;" width="32"></a></td>
                                                            <td style="vertical-align: middle; text-align: center; padding-top: 10px; padding-bottom: 10px; padding-left: 15px; padding-right: 15px;" class=""><a href="https://blackbull.com" style="text-decoration: none;" target="_self"><img align="center" class="icon" height="32" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/live_chat-32.png" style="height: auto; display: block; margin: 0 auto; border: 0;" width="32"></a></td>
                                                            <td style="vertical-align: middle; text-align: center; padding-top: 10px; padding-bottom: 10px; padding-left: 15px; padding-right: 15px;" class=""><a href="https://blackbull.com" style="text-decoration: none;" target="_self"><img align="center" class="icon" height="32" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/visit-web-32.png" style="height: auto; display: block; margin: 0 auto; border: 0;" width="32"></a></td>
                                                            <td style="vertical-align: middle; text-align: center; padding-top: 10px; padding-bottom: 10px; padding-left: 15px; padding-right: 10px;" class=""><a href="[email protected]" style="text-decoration: none;" target="_self"><img align="center" class="icon" height="32" src="https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/BeeProAgency/867844_851980/mail-32.png" style="height: auto; display: block; margin: 0 auto; border: 0;" width="32"></a></td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
html css email html-email pardot
© www.soinside.com 2019 - 2024. All rights reserved.