html - Gmail - CSS - 列计数不起作用

标签 html css gmail webmail

问题是 gmail webmail 界面不希望读取“column-count: 2”嵌入样式。我尝试过将样式嵌入到一些 HEAD 标签中以及使用一些内联样式。似乎什么都不起作用。我应该尝试什么建议或替代方案吗?

注意:此 HTML 是动态构建的。该类正在使用 javascript 在代码隐藏中以编程方式进行修改。目标是提供单列 View 与两列 View 之间的切换选项。我似乎也无法使用 TABLE 元素将文本均匀地包裹在两列之间。任何建议将不胜感激。

<!DOCTYPE html>
<html>
<head>
<style>
      .twoColumn {
        column-count: 2!important; 
        -webkit-column-count: 2!important; 
        -moz-column-count: 2!important;
      }
    </style>
</head>
<body>

<div style="width: 700px; "><div><div style="background-color: #f2f2f2; width: 1000px;"><div style="width: 800px; border: solid 1px #888888; background-color: white; margin-left: 100px;"><div><img style="width: 100%;" src="http://cdn.eldercounsel.com/assets/uploads/misc/20180318201901_success.jpg" /></div><div style="width: 88%; word-break:break-all;color:#000000; padding: 0 10px 0 10px;  margin: 30px;"><div><div><h2>Newsletter Two Column Article</h2></div><div><div><p>Hi <label data-toggle="tooltip" id="Subscriber" title="This will be replaced by your contact's first name on file">Bob</label>,</p><div class="fr-inner twoColumn" id="ParentDiv"><span style="font-size: 30px;">What is Lorem Ipsum?</span><br><p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p><h2>Why do we use it?</h2><p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using &#39;Content here, content here&#39;, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for &#39;lorem ipsum&#39; will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p><br><br><h2>Where does it come from?</h2><p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of &quot;de Finibus Bonorum et Malorum&quot; (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, &quot;Lorem ipsum dolor sit amet..&quot;, comes from a line in section 1.10.32.</p><p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from &quot;de Finibus Bonorum et Malorum&quot; by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p><h2>Where can I get some?</h2><p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don&#39;t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn&#39;t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p></div></div></div></div><br />

</body>
</html>

最佳答案

电子邮件不支持列。请参阅this图表显示受支持的 CSS 属性列表。

关于html - Gmail - CSS - 列计数不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49357389/

相关文章:

email - 糟糕的 Google Postmaster 域声誉

html - CSS 中 img 的 ALT

html - 为什么我的菜单不起作用?

html - 使用链接 rel "og:url"时可以省略 ="canonical"

css - CSS 中的附加属性

html - 如何让标签停留在选择元素的顶部?

html - 将输入字段的顺序从垂直更改为水平?

PHP imap_search 未检测到 gmail 收件箱中的所有邮件

java - 以编程方式将草稿保存在 Gmail 草稿文件夹中

javascript onclick 不适用于 P 元素