简体   繁体   English

CSS 在收到 Email 时未应用于 HTML 文档

[英]CSS Not Being Applied To HTML Document When Email Is Received

I've been having some issues with styling when sending a document based on an HTML string.在发送基于 HTML 字符串的文档时,我遇到了一些样式问题。 I have been primarily referencing this resource ( https://developers.docusign.com/esign-rest-api/guides/responsive-signing/creating-signable-html ), specifically the section at the bottom which details which HTML and CSS elements are supported by Docusign.我主要参考了这个资源( https://developers.docusign.com/esign-rest-api/guides/responsive-signing/creating-signable-html ),特别是底部的部分,详细说明了 HTML 和 HTML 和 Z20C56C3EDZ605482由 Docusign 支持。 Every element that I use is on these approved lists, yet the styling that I apply to the HTML string does not seem to make it through to the received email.我使用的每个元素都在这些已批准的列表中,但我应用于 HTML 字符串的样式似乎无法通过收到的 email 实现。 In particular, any sort of padding that I apply seems to be completely ignored after going through Docusign's end.特别是,我应用的任何类型的填充似乎在经过 Docusign 结束后都被完全忽略了。 I have tried a variety of ways to apply padding, such as using percentages or em in my CSS and also using a style tag, external style sheet, and inline styling, yet none of these seem to work.我尝试了多种应用填充的方法,例如在我的 CSS 中使用百分比或 em,还使用样式标签、外部样式表和内联样式,但这些似乎都不起作用。

As a specific example, in the document I am trying to send, I often need to begin a section with a number, followed by a large space, followed by text.作为一个具体的例子,在我试图发送的文档中,我经常需要以数字开头的部分,然后是一个大空格,然后是文本。 The HTML I use is something like this:我使用的 HTML 是这样的:

2. <span style='margin-left: 2em'></span> <b>Inventions.</b>

When rendering this HTML in a browser, I get this:在浏览器中渲染这个 HTML 时,我得到这个:

Desired Display所需的显示

However, when receiving the document back from Docusign, it looks like this:但是,当从 Docusign 收到文档时,它看起来像这样:

Actual Display实际显示

This seems to happen for just about all of my CSS leaving the received document looking very poor.这似乎发生在我所有的 CSS 中,使收到的文档看起来很差。 I'm not sure what I'm missing here as these CSS elements should be supported by Docusign我不确定我在这里缺少什么,因为 Docusign 应该支持这些 CSS 元素

Margin-Top not working for span element? Margin-Top 不适用于 span 元素?

margin CSS property not allowed on span element.跨度元素上不允许使用边距 CSS 属性。

Nothing to do with DocuSign.与 DocuSign 无关。

You can push it right side in other ways (add blank space) or just use <p> or <div> instead.您可以以其他方式将其推向右侧(添加空格)或仅使用<p><div>代替。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM