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

标签 html css outlook embed

我有一个简单的问题。我创建了一个 html 文件,当我尝试将 html 文件嵌入到我的 outlook 中以将其发送给我的客户时。元素不可见。为什么?我错过了什么。请指导。下面是我的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>

最佳答案

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

Campaign monitor 有一个很好的表格,您可以在这里引用: https://www.campaignmonitor.com/dev-resources/will-it-work/forms/

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

关于在电子邮件中嵌入表单时 HTML 元素不可见?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36113884/

相关文章:

jquery - 单击 'Read More' 按钮会导致打开所有 block 而不是其特定的父 block

javascript - Bootstrap 日期时间选择器不工作

c# - 在 Outlook MailItem 中设置自定义 header

css - 悬停在第三个不同的 div 上时移动 2 个不同的 div

css - 如何在 div 悬停时显示更多文本?

c# - 使用 C# 按日期列出 Outlook 中的约会

email - Exim 的 DKIM 签名不会在 Microsoft 服务器(outlook、hotmail)上验证*仅*

html - 不同页面中的相同 H1 标签?

html - 为什么我的动画属性在 CSS 中不起作用

javascript - 只要不是 <a> 标签,就可以在单击某个区域时使用react