CSS 样式和 Jscript 在 MS Outlook 2007 中未正确反映

2024-02-05

我已附上我试图在 MS Outlook 2007 中显示的 HTML 代码。它在 Chrome 中工作正常,但在 Outlook 中则无法正常工作。我怎样才能在 Outlook 中实现此功能?

我们可以使用替代代码/标签来代替我在这里使用的代码/标签,以使其在 MS Outlook 2007 中工作吗?如果是这样,请帮我解决一下。

<!DOCTYPE html>
<html>
<body>
<div>

<ol class="track-progress" data-steps="3">
   <li id="1">
     <span style="color:Black;font-weight:bold;font-size:70%">Submission</span>
     <i></i>
   </li><!--
--><li id="2">
     <span style="color:Black;font-weight:bold;font-size:70%">Approval</span>
   </li><!--
--><li id="3">
     <span style="color:Black;font-weight:bold;font-size:70%">Implementation</span>
   </li><!--
--><li id="4">
     <span style="color:Black;font-weight:bold;font-size:70%">Completed</span>
     <i></i>
   </li><!--
--><li id="5">
     <span style="color:Black;font-weight:bold;font-size:70%">Rejected</span>
     <i></i>
   </li>
 </ol></div>
 
<style>
.track-progress li > span {
  display: block;

  color: #0000;
  //font-weight: bold;
  //text-transform: uppercase;
}
.track-progress li > span:after,
.track-progress li > span:before {
  content: "";
  display: block;
  width: 0px;
  height: 0px;

  position: absolute;
  top: 0;
  left: 0;

  border: solid transparent;
  border-left-color: #f0f0f0;
  border-width: 15px;
}

.track-progress li > span:after {
  top: -5px;
  z-index: 1;
  border-left-color: white;
  border-width: 20px;
}

.track-progress li > span:before {
  z-index: 2;
}
.track-progress li.done + li > span:before {
  border-left-color: #19832f;
  
}
.track-progress li.ongoing + li > span:before {
  border-left-color: #24d347;
}

.track-progress li:first-child > span:after,
.track-progress li:first-child > span:before {
  display: none;
}

.track-progress[data-steps="3"] li { width: 15%; }
.track-progress[data-steps="4"] li { width: 25%; }
.track-progress[data-steps="5"] li { width: 20%; }
.track-progress {
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.track-progress li:first-child i,
.track-progress li:last-child i {
  display: block;
  height: 0;
  width: 0;

  position: absolute;
  top: 0;
  left: 0;

  border: solid transparent;
  border-left-color: white;
  border-width: 15px;
}

.track-progress li:last-child i {
  left: auto;
  right: -15px;

  border-left-color: transparent;
  border-top-color: white;
  border-bottom-color: white;
}
.track-progress li {
  list-style-type: none;
  display: inline-block;

  position: relative;
  margin: 0;
  padding: 0;

  text-align: center;
  line-height: 30px;
  height: 30px;

  background-color: #f0f0f0;
}
</style>

<script>
var firstName = "Planning";
if (firstName === "Draft") {
	document.getElementById("1").style.backgroundColor = "#81C5F1";
	document.getElementById("2").style.backgroundColor = "#f0f0f0";
	document.getElementById("3").style.backgroundColor = "#f0f0f0";
	document.getElementById("4").style.backgroundColor = "#f0f0f0";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "In Cart") {
	document.getElementById("1").style.backgroundColor = "#81C5F1";
	document.getElementById("2").style.backgroundColor = "#f0f0f0";
	document.getElementById("3").style.backgroundColor = "#f0f0f0";
	document.getElementById("4").style.backgroundColor = "#f0f0f0";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "In Review") {
	document.getElementById("1").style.backgroundColor = "#81C5F1";
	document.getElementById("2").style.backgroundColor = "#f0f0f0";
	document.getElementById("3").style.backgroundColor = "#f0f0f0";
	document.getElementById("4").style.backgroundColor = "#f0f0f0";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "Submitted") {
	document.getElementById("1").style.backgroundColor = "#81C5F1";
	document.getElementById("2").style.backgroundColor = "#f0f0f0";
	document.getElementById("3").style.backgroundColor = "#f0f0f0";
	document.getElementById("4").style.backgroundColor = "#f0f0f0";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "Waiting Approval") {
	document.getElementById("1").style.backgroundColor = "#77E765";
	document.getElementById("2").style.backgroundColor = "#81C5F1";
	document.getElementById("3").style.backgroundColor = "f0f0f0";
	document.getElementById("4").style.backgroundColor = "f0f0f0";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "Pending") {
	document.getElementById("1").style.backgroundColor = "#77E765";
	document.getElementById("2").style.backgroundColor = "#77E765";
	document.getElementById("3").style.backgroundColor = "#81C5F1";
	document.getElementById("4").style.backgroundColor = "f0f0f0";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "Planning") {
	document.getElementById("1").style.backgroundColor = "#77E765";
	document.getElementById("2").style.backgroundColor = "#77E765";
	document.getElementById("3").style.backgroundColor = "#81C5F1";
	document.getElementById("4").style.backgroundColor = "f0f0f0";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "In Progress") {
	document.getElementById("1").style.backgroundColor = "#77E765";
	document.getElementById("2").style.backgroundColor = "#77E765";
	document.getElementById("3").style.backgroundColor = "#81C5F1";
	document.getElementById("4").style.backgroundColor = "f0f0f0";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "Completed") {
	document.getElementById("1").style.backgroundColor = "#77E765";
	document.getElementById("2").style.backgroundColor = "#77E765";
	document.getElementById("3").style.backgroundColor = "#77E765";
	document.getElementById("4").style.backgroundColor = "#81C5F1";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "Closed") {
	document.getElementById("1").style.backgroundColor = "#77E765";
	document.getElementById("2").style.backgroundColor = "#77E765";
	document.getElementById("3").style.backgroundColor = "#77E765";
	document.getElementById("4").style.backgroundColor = "#81C5F1";
	document.getElementById("5").style.backgroundColor = "f0f0f0";
}
if (firstName === "Rejected") {
	document.getElementById("1").style.backgroundColor = "f0f0f0";
	document.getElementById("2").style.backgroundColor = "f0f0f0";
	document.getElementById("3").style.backgroundColor = "f0f0f0";
	document.getElementById("4").style.backgroundColor = "f0f0f0";
	document.getElementById("5").style.backgroundColor = "#F74141";
}
if (firstName === "Cancelled") {
	document.getElementById("1").style.backgroundColor = "f0f0f0";
	document.getElementById("2").style.backgroundColor = "f0f0f0";
	document.getElementById("3").style.backgroundColor = "f0f0f0";
	document.getElementById("4").style.backgroundColor = "f0f0f0";
	document.getElementById("5").style.backgroundColor = "#F74141";
}

</script>
</body>
</html>

我怎样才能在 Outlook 中实现此功能?

您需要阅读以下资源:支持的 HTML 元素、属性和级联样式表属性 https://msdn.microsoft.com/en-us/library/aa338201(v=office.12).aspx#Supported%20HTML%20Elements,%20Attributes,%20and%20Cascading%20Style%20Sheet%20Properties or 使用 Outlook HTMLBody – Office 开发人员指南 https://www.add-in-express.com/creating-addins-blog/2015/02/23/outlook-htmlbody-guide/。通过简要查看您的 HTML 代码以及 Outlook 允许的内容,您会发现您正在使用许多不受支持的标签。例如:“显示”、“溢出”等。请清理您的 HTML 并使其与 OUTLOOK 能够呈现的内容兼容。您也可以使用在线提供的Outlook HTML 电子邮件在线验证器 http://jonathanaquino.com/outlook-html-email-validator.php。我不知道它有多准确,但这绝对是一个很好的开始方式。

我们可以使用替代代码/标签来代替我在这里使用的代码/标签,以使其在 MS Outlook 2007 中工作吗?

是的,这正是您应该做的。使用受支持的 CSS 样式和 HTML 标签。

如果是这样,请帮我解决一下。

这是作为开发人员应该做的。这可能也是您获得报酬的工作。因此,只需根据提供的资源进行操作即可,不要指望有人会为您编写代码。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

CSS 样式和 Jscript 在 MS Outlook 2007 中未正确反映 的相关文章

随机推荐

  • 屏蔽掉c中不需要的位

    给定小数71744474在二进制中它是0100010001101011101111011010我试图从这个十进制中提取的是从低位开始的每七位 这七个位中的每一个都代表一个可打印的 ASCII 字符 该字符只能有 7 位 我总共拉出了四个角色
  • 如何为 PHPUnit 测试创建内存数据库?

    我是 PHPUnit 以及一般单元测试 的新手 我想要开发一个测试套件 开发人员可以在本地运行 但也可以在我们的集成系统 Codeship 中运行 我知道可以使用内存数据库 但似乎依赖于我们没有使用的迁移 似乎不能很好地处理视图 存储过程
  • 使用 Mono Touch 在循环中使用 CGImage.ScreenImage 时出现内存问题

    我正在尝试创建一个应用程序来使用 Monotouch 和 Zxing 的 C 端口读取 QR 码 但遇到了内存问题 当应用程序处理捕获的屏幕帧时 应用程序会收到内存警告 然后关闭 我删除了对 Zxing 的调用 以追踪内存问题的根源 并且只
  • 如何去除视频的绿色背景,使其透明?

    我有一个video https youtu be XfHJ57XIb4具有绿色背景 我想删除这个绿色部分 色度键 https wikipedia org wiki Chroma key 使其透明 然后将视频显示在网站背景上 我只能找到使用图
  • 文本颜色在 Material-UI 主题中不起作用

    使用 Material UI 创建颜色主题时 我将对比度文本设置为白色 fff 它适用于具有原色的按钮 但不适用于次要颜色 尝试了如下所述的覆盖 Material UI 无法更改主题中的按钮文本颜色 https stackoverflow
  • TOOLCHAIN_HOST_TASK 与 TOOLCHAIN_TARGET_TASK

    我很抱歉问了一个天真的问题 我无法理解这些 Yocto 变量之间的区别 手册说 TOOLCHAIN HOST TASK 列出构成主机部分的包 SDK 即在SDKMACHINE上运行的部分 当你使用bitbake时 c populate sd
  • 一个循环遍历多个 Lua 表

    是否可以使用同一个循环遍历多个 Lua 表 为了循环索引表 我可以这样做 local t1 a b c local t2 d e f local num t1 t2 for i 1 num do local j local val if i
  • 使用 jQuery 将 HTML 插入 iFrame Body 标记

    我正在使用托管 CMS 它在另一个 iFrame 中呈现一个 iFrame 这些 iFrame 是从同一域加载的 但由于这是托管 CMS 我无法直接访问这些 iFrame 是否可以使用 jQuery 将 HTML 内容插入到bodyiFra
  • 跳到一行并阅读它

    我必须处理大文件 许多 GB 并且需要快速查找以根据请求检索特定行 这个想法是维护一个映射 some key gt byte location 其中字节位置表示该行在文件中的起始位置 编辑 问题稍微改变了 首先我使用 FileInputSt
  • 在Delphi中加密/解密文本文件?

    您好 我想知道文本文件加密和解密的最佳加密技术 我的场景 我的软件有两种类型的用户 管理员和操作员 我们的要求是当管理员使用GUI输入数据并保存时加密文本文件 该加密文件将作为操作员的输入 他们只需选择它并使用该文件 当操作员选择这些文件时
  • 登录时自动运行 Bash 脚本

    我编写了一个脚本 它将登录者的日期和用户名发送到日志文件中 以记录登录者的记录 我想知道如何设置此脚本在用户登录时自动执行 而不是在用户登录时自动执行在终端中手动运行它 注意 用户名是当前登录的用户 my code bin bash pri
  • Xcode 可以在代码中使用“文件夹引用”吗?

    和许多人一样 我希望 Xcode 使用反映磁盘上文件夹结构的文件夹结构 但是 我无法将 文件夹引用 青色文件夹 中的代码显示在 编译源 下的项目目标中 有什么办法可以做到这一点吗 我什至设法将青色文件夹添加到 编译源 构建阶段 但这不会导致
  • 如何用 C++ 创建 OpenOffice 文档 [重复]

    这个问题在这里已经有答案了 可能的重复 从 C 创建 打开和打印 Word 文件 https stackoverflow com questions 145573 creating opening and printing a word f
  • 捕获 pygraphviz 图像渲染而不保存到文件?

    pygraphviz 是否允许您将图像渲染到变量 我想通过网页提供动态图像 而无需将图形渲染到磁盘 根据到源代码 https github com pygraphviz pygraphviz blob 1f7f314530080c152a4
  • 从Python中的国家/地区代码获取电话号码的国际前缀

    是否可以使用python 电话号码 https github com daviddrysdale python phonenumbers或另一个 python 库 用于从两个字母的国家 地区代码中获取国家 地区调用代码 ISO 3166 1
  • Windows 本地应用程序引擎用法:oauth2client ImportError

    我正在使用 App Engine Standard 开发 Python 后端服务 在某个时候 我告诉自己 嘿 为什么不尝试在使用远程数据存储时在本地运行服务器 我可以在本地运行此代码 但我无法弄清楚为什么 remote api stub 会
  • jquery密集文本阴影和模糊背景颜色

    我正在寻找一种方法 演示来制作额外密集的厚文本阴影jquery 像 jquery 一样跨浏览器兼容 这可能简单的CSS不可能实现 具有 IE 支持 不过 多个阴影遮盖了它一点 但问题是我认为旧的浏览器兼容性问题 jQuery 涵盖了它 这就
  • 贝尔曼-福特算法的正确性,我们还能做得更好吗?

    我了解到贝尔曼 福特算法的运行时间为O E V 其中E是边数 V是顶点数 假设该图没有任何负加权循环 我的第一个问题是 我们如何证明在 V 1 次迭代 每次迭代检查 E 中的每条边 内 给定特定的起始节点 它更新到每个可能节点的最短路径 有
  • Vue2-传单地图在 BoostrapVue 模式中无法正确显示

    这是我的问题 Vue2 传单地图无法在 BootstrapVue 模式中正确渲染 这是它的视觉效果 它应该只显示海洋
  • CSS 样式和 Jscript 在 MS Outlook 2007 中未正确反映

    我已附上我试图在 MS Outlook 2007 中显示的 HTML 代码 它在 Chrome 中工作正常 但在 Outlook 中则无法正常工作 我怎样才能在 Outlook 中实现此功能 我们可以使用替代代码 标签来代替我在这里使用的代