【发布时间】:2020-04-08 12:27:50
【问题描述】:
我正在为 Outlook 设计电子邮件模板。需要您的支持来优化移动响应设计。附上图片以供参考。我尝试了媒体查询,但电子邮件模板似乎不支持内部 CSS。
> <!DOCTYPE html>
> <html>
> <head>
> <meta http-equiv=Content-Type content='text/html charset=UTF-8' />
> <meta name=viewport content='width=device-width, initial-scale=1.0'/>
> <style>
> @media only screen and (max-width: 600px){
> td {
> display:table-row;
> padding-left:32px;
> height:100%;
> border:1px dotted red;
> text-align:center;
> position: relative;
> padding: 50%;
> }
> table{
> height:100vh;
> width: 100%!important;
> }
> .panel{
> width: 100%;
> margin-bottom: 15px;
> overflow-y: hidden;
> -ms-overflow-style: -ms-autohiding-scrollbar;
> border: 1px solid #ddd;
> }
> .panel > .table {
> margin-bottom: 0;
>
> }
> .panel > .table > thead > tr > th,
> .panel > .table > tbody > tr > th,
> .panel > .table > tfoot > tr > th,
> .panel > .table > thead > tr > td,
> .panel > .table > tbody > tr > td,
> .panel > .table > tfoot > tr > td {
> white-space: nowrap;
> display: block;
> width:100%;
> }
> }
> </style>
> </head>
> <body>
> <div class='panel'>
> <div class='heading' style = 'background-color:#0BF4CD; border-style:none;mso-line-height-rule: exactly;line-height:
> 30px;'> </div>
> <div class='panel-body' style='margin: 0;padding: 0;'>
> <table style='width: 100%; font-size: 16px;border-collapse:collapse;' border='1' bordercolor='#A9A9A9'
> cellspacing='0' cellpadding='0'>
> <tbody>
> <tr style='color:#000000'>
> <td style='padding-left:32px'>
> <strong>Customer Impact</strong>
> </td>
> <td style='padding:10px 0 7px 15px'>
> <span id='spanCustomer_Impact'>[[textarea:Customer_Impact]]</span>
>
> </td>
> </tr>
> <tr style='color:#000000'>
> <td style='padding-left:32px'>
> <strong>Notes</strong>
>
> </td>
> <td style='padding:10px 0 7px 15px'>
>
> <span id='spanReason_for_Notification'>[[textarea:Reason_for_Notification]]</span>
>
> </td>
> </tr>
> <tr style='color:#000000'>
> <td style='padding-left:32px' rowspan='4'>
> <strong>Timestamp</strong>
>
> </td>
> <td style='padding:7px 0 0 15px; border-bottom-style:hidden!important'>
>
> <strong>Notification Date/Time (EST):</strong>
>
> <span id='spanNotification_Time'>[[date:Notification_Time]]</span>
> </td>
> <tr style='color:#000000'>
> <td style='padding:7px 0 0 15px; border-bottom-style:hidden!important'>
>
> <strong>Start Date/Time (EST):</strong>
>
> <span id='spanStart_Date'>[[date:Start_Date]]</span>
> </td>
> </tr>
> <tr style='color:#000000'>
> <td style='padding:7px 0 0 15px; border-bottom-style:hidden!important'>
>
> <strong>End Date/Time (EST):</strong>
>
> <span id='spanEnd_Date'>[[date:End_Date]]</span>
> </td>
> </tr>
> <tr style='color:#000000'>
> <td style='padding:7px 0 7px 15px'>
>
> <strong>Expected End Date/Time (EST):</strong>
>
> <span id='spanExpected_End_Time'>[[date:Expected_End_Time]]</span>
>
> </td>
> </tr>
> </tr>
> <tr style='color:#000000'>
> <td style='padding-left:32px'>
>
> <strong>Expected Duration</strong>
>
> </td>
> <td style='padding:10px 0 7px 15px' >
>
> <span id='spanDuration'>[[string:Duration]]</span>
> </td>
> </tr>
> </tbody>
> </table>
> </div>
> <div class='footer' style = 'background-color:#0BF4CD; border-style:none;mso-line-height-rule: exactly;line-height:20px'> </div>
> </div>
> </body>
> </html>
据我们所知,只有内联 CSS 可用于 Outlook。有没有办法为 Outlook 进行移动响应式设计以及如何实现?有人可以帮我做这个设计吗?我不太擅长设计。我需要你的支持。
【问题讨论】:
标签: html css outlook html-email