zoukankan      html  css  js  c++  java
  • 邮箱(outlook)嵌入html页面

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>邮件模板</title>
    </head>
    <body>
    <table width="1024" border="0" cellspacing="0" cellpadding="0"
           style="margin: 0 auto;font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
        <tbody>
        <tr>
            <td style=" padding: 30px 0;">
                <table width="100%" border="0" cellspacing="0" style="font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                    <tbody>
                    <tr>
                        <td width="10%">
                            <img src="logo.png">
                        </td>
                        <td style="padding-left: 20px;">
                            <p style="margin: 0; font-weight:bold;color:#000;font-size:34px;border:none;font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                                xxxxxxx</p>
                            <p style="margin: 0; color: #777; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                                QIYU Developer Platform</p>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr>
            <td width="100%" style="background-color: #fafafa; padding: 40px 120px 40px 120px; border-radius: 10px;">
                <table>
                    <td style="padding-bottom: 20px;">
                        <p style=" font-weight: bold; color: #000;margin: 0;padding-bottom: 5px; font-size: 20px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                            Dear XXX:</p>
                        <P style=" font-weight: bold; color: #000;margin: 0;font-size: 20px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                            Welcome to the ccxccc! </P>
                    </td>
                </table>
                <table width="100%" border="0" cellspacing="0" style="font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                    <tr>
                        <td width="28%" style="padding-bottom:2px;color: #999; font-size: 18px;font-family:'微软雅黑',Helvetica,Arial,sans-serif; ">Account
                            number:
                        </td>
                        <td style="padding-bottom:2px; "><span style="font-size: 18px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">xxxxxxxxx</span>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-bottom:2px; font-size: 18px; color: #999; padding-right: 118px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">Passwords:
                        </td>
                        <td style="padding-bottom:2px;"><span style="font-size: 18px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">xxxxxxxxx</span>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-bottom:2px;font-size: 18px; color: #999; padding-right: 82px; font-family:'微软雅黑',Helvetica,Arial,sans-serif; ">Access address:</td>
                        <td style="padding-bottom:2px; color: #14dd8c; "><span style="font-size: 18px; color: #14dd8c; font-family:'微软雅黑',Helvetica,Arial,sans-serif;"><a
                                style="color: #14dd8c;  text-decoration: none; text-decoration: none !important;"
                                href="#">https://www.baidu.com</a></span></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="background-color: #fff; height: 20px;"></td>  // 单独设置一个tr td能实现外边距效果
        </tr>
        <tr>
            <td width="100%"
                style="background-color: #fafafa; font-family:'微软雅黑',Helvetica,Arial,sans-serif; padding: 40px 40px 40px 120px; border-radius: 10px;">
                <table>
                    <td style="padding-bottom: 20px;">
                        <p style=" font-weight: bold; color: #000;margin: 0;padding-bottom: 5px; font-size: 20px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                            Dear XXX:</p>
                        <P style=" font-weight: bold; color: #000;margin: 0;font-size: 20px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                            欢迎加入xxxx,请尽情实现你的伟大想法吧! </P>
                    </td>
                </table>
                <table width="100%" border="0" cellspacing="0" style="font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                    <tr>
                        <td width="25%" style="padding-bottom:12px; font-size: 18px; color: #999; padding-right: 82px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">账号:
                        </td>
                        <td style="padding-bottom:12px; "><span style="font-size: 18px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">xxxxxxxxx</span>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-bottom:12px; font-size: 18px; color: #999; padding-right: 82px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">密码:
                        </td>
                        <td style="padding-bottom:12px; "><span style="font-size: 18px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">xxxxxxxxx</span>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-bottom:12px; font-size: 18px; color: #999; padding-right: 82px; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">访问地址: </td>
                        <td style="padding-bottom:12px; color: #14dd8c;"><span style="font-size: 18px;  color: #14dd8c; font-family:'微软雅黑',Helvetica,Arial,sans-serif;"><a
                                style="color: #14dd8c; text-decoration: none; text-decoration: none !important;"
                                href="#">https://www.baidu.com</a></span></td>
    
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="text-align: center;padding: 60px 0 40px;color: #878787; font-family:'微软雅黑',Helvetica,Arial,sans-serif;">
                Copyright © 2020 xxx All Rights Reserved
            </td>
        </tr>
        </tbody>
    </table>
    </body>
    </html>

    注意事项:

    1、首先不能使用布局属性,包括flex、float、absolute、relative等布局。(主要针对windows,mac下面能识别大多数的h5属性)。正确方案是使用table布局,且使用尽可能简单的属性。

    2、td设置属性“padding”有效,但是相邻的两个td或者相邻的两个其他标签不能同时设置,否则会叠加。

    3、tr设置padding和margin无效。

    4、最好每个元素都设置字体,否则在windows下和mac下的样式有差异。

    5、关于布局:可在td内嵌套多个table,用于解决行与行之间列是错位的情况(如:第一行第二行都分两列,第一行左边列宽比第二行左边列宽宽很多)。否则使用一个table只能永远按照第一列的列宽来排列。无法实现需求。

    6、样式不要使用外链引用,也不要写在head头部里面,可直接写成行内样式即可。

    没有人能一路单纯到底,但是要记住,别忘了最初的自己!
  • 相关阅读:
    node.js模块本地代理模块(将自己本机/局域网)服务 代理到外网可以访问
    node.js基本概念简单解释
    RN 使用第三方组件之react-native-image-picker(拍照/从相册获取图片)
    RN 上传文件到以及上传文件到七牛云(初步)
    【HTML+CSS+JavaScript+Bootstrap+Vue】选项卡(两种方式)
    【HTML+CSS+JavaScript+Bootstrap+Vue】登录(获取表单数据)
    【HTML+CSS+JavaScript+Bootstrap+Vue】待办事项
    第六章 前端开发——Vue框架
    第五章 前端开发——Boostrap
    【HTML+CSS+JavaScript(jQuery)】轮播图
  • 原文地址:https://www.cnblogs.com/LindaBlog/p/14675414.html
Copyright © 2011-2022 走看看