在电子邮件中嵌入表单时,HTML元素不可见?

时间:2016-03-20 12:48:32

标签: html css outlook embed

我有一个简单的问题。我创建了一个html文件,当我尝试在我的Outlook中嵌入html文件发送给我的客户端时。元素不可见。为什么?我错过了什么。请指导。以下是我的HTML

<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <style type="text/css"> body{background-color: #FFFFFF;font-family: arial;margin: 0;} </style>
<title>TEst</title>
</head>

<body>

<table height="100px;" width="72px;" border="1" align="center" cellpadding="0" cellspacing="0" style="font-family:Verdana, Geneva, sans-serif;">

  <tr>

<section id="form">
<form id="gform"  method="post" action="someAction">
<div id="left-col-forms" style="float: left; width: 330px; font-family: 'Open Sans', sans-serif;font-size:12px;">



    <fieldset style="width:700px;">
      <label for="name"><b>Name:</b> </label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input id="name" name="name" placeholder="Please Enter Your Name"  style="width:400px;" />
    </fieldset>


    <fieldset style="width:700px;">

    <label for="Phone"><b>Phone:</b> </label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input id="phone" name="phone" placeholder="" />
    </fieldset>



<button style="float: left;">Submit</button>
</div>


</form>
</section>
</div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>

</body>
</html>

1 个答案:

答案 0 :(得分:1)

电子邮件中的表单被视为存在安全风险,它们通常无法正常工作,并且根据您使用它的电子邮件客户端可能根本无法显示。

Campaign监视器有一个很好的表,您可以在这里参考: https://www.campaignmonitor.com/dev-resources/will-it-work/forms/

更好的解决方案是将表单放在网页中,并将链接发送给网页本身。