- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 VML 代码在 HTML 邮件中显示背景。我在一个表格单元格中有 3 个表格,它们并排放置,但是当我在 Outlook 中测试我的电子邮件时,表格不再彼此相邻,它使我的三个表格垂直对齐,就像每个表格都在一个行。
这是我的代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table bgcolor="#ffffff" width="600" border="0" cellpadding="0" cellspacing="0"
align="center" class="normal" style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;">
<tr>
<td background="http://i.imgur.com/YJOX1PC.png" style="background-image:url('http://i.imgur.com/YJOX1PC.png');" bgcolor="#7bceeb" width="600" height="700" valign="top">
<!--[if gte mso 9]>
<v:rect strokecolor='none' style='width:600px;height:700px;'>
<v:fill color='#363636' src='http://i.imgur.com/YJOX1PC.png' type='tile'></v:fill>
</v:rect>
<v:shape id='NameHere' style='position:absolute;width:600px;height:700px;'></v:shape>
<![endif]-->
<div><table width="580" border="0" cellpadding="0"
cellspacing="0" align="center" class=
"spaced2" >
<tr>
<td valign="top" style="border:none;"><table class="aligntable" border="0" cellpadding=
"0" cellspacing="0" align="left"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;"><tr>
<td height="20"> </td></tr>
<tr>
<td width="180" align="center"><img border="0" src=
"" width="180" height="180" /></td>
</tr>
<tr>
<td width="180" valign="middle" align="center"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #0b5ed7;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 16px;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 150%;letter-spacing: 0px;">
<center>
TEST
</center></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
<tr>
<td width="180" height="255" valign="top"
align="left" style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #000000;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 12px;font-weight: normal;text-decoration: none;outline: none;line-height: 120%;">TEST </td>
</tr>
<tr>
<td align="center" valign="top" width="180"><img src=
""
border="0"
/></a></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
</table>
<table width="20" align="left" border="0">
<tr>
<td></td>
</tr>
</table>
<table class="aligntable2" border="0" cellpadding=
"0" cellspacing="0" align="left"
style=
"display:block; mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;"><tr><td height="20"></td></tr>
<tr>
<td width="180" align="center"> <img border="0" src=
"" width="180" height="180" /></td>
</tr>
<tr>
<td width="180" valign="middle" align="center"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #0b5ed7;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 16px;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 150%;letter-spacing: 0px;">
<center>
TEST
</center></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
<tr>
<td width="180" height="255" valign="top"
align="left" style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #000000;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 12px;font-weight: normal;text-decoration: none;outline: none;line-height: 120%;"> TEST</td>
</tr>
<tr>
<td align="center" width="180"><a target="_blank" style=
"FONT-SIZE: 16px; COLOR: #0e5fd8; -webkit-text-size-adjust:none; FONT-FAMILY: Verdana, Arial; text-decoration:none; line-height:16px;"
href=
"http://www.philips.at/c-p/NTRX100_12/?origin=3_at_de_spoilyourself2__ot_dec__hero_img&elqtrack=true"> <img src=
""
border="0" /></a></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
</table>
<table class="aligntable3" border="0" cellpadding=
"0" cellspacing="0" align="right"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;"><tr><td height="20"></td></tr>
<tr>
<td width="180" align="center"><img border="0" src=
"" width="180" height="180" /></td>
</tr>
<tr>
<td width="180" valign="middle" align="center"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #0b5ed7;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 16px;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 150%;letter-spacing: 0px;">
<center>
TEST
</center></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
<tr>
<td width="180" height="255" valign="top"
align="left" style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #000000;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 12px;font-weight: normal;text-decoration: none;outline: none;line-height: 120%;">TEST </td>
</tr>
<tr>
<td align="center" width="180"> <img src=
"" alt=
width="50"
border="0"/></a></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
</table></td>
</tr>
</table>
<!--END TD -->
</div>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</td>
</tr>
</table>
</body>
</html>
最佳答案
嘿,我刚刚也遇到了这个问题并找到了解决办法。
这里发生的是在 </table>
之后在 <table>
之前, Outlook VML 添加了一个 Word 段落标记,它强制表格显示为堆叠而不是相互内嵌。
在 </table><table>
之间放这段条件代码
<!--[if mso]></td><td><![endif]-->
你的代码看起来像这样
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table bgcolor="#ffffff" width="600" border="0" cellpadding="0" cellspacing="0"
align="center" class="normal" style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;">
<tr>
<td background="http://i.imgur.com/YJOX1PC.png" style="background-image:url('http://i.imgur.com/YJOX1PC.png');" bgcolor="#7bceeb" width="600" height="700" valign="top">
<!--[if gte mso 9]>
<v:rect strokecolor='none' style='width:600px;height:700px;'>
<v:fill color='#363636' src='http://i.imgur.com/YJOX1PC.png' type='tile'></v:fill>
</v:rect>
<v:shape id='NameHere' style='position:absolute;width:600px;height:700px;'></v:shape>
<![endif]-->
<div><table width="580" border="0" cellpadding="0"
cellspacing="0" align="center" class=
"spaced2" >
<tr>
<td valign="top" style="border:none;"><table class="aligntable" border="0" cellpadding=
"0" cellspacing="0" align="left"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;"><tr>
<td height="20"> </td></tr>
<tr>
<td width="180" align="center"><img border="0" src=
"" width="180" height="180" /></td>
</tr>
<tr>
<td width="180" valign="middle" align="center"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #0b5ed7;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 16px;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 150%;letter-spacing: 0px;">
<center>
TEST
</center></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
<tr>
<td width="180" height="255" valign="top"
align="left" style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #000000;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 12px;font-weight: normal;text-decoration: none;outline: none;line-height: 120%;">TEST </td>
</tr>
<tr>
<td align="center" valign="top" width="180"><img src=
""
border="0"
/></a></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
</table>
<table width="20" align="left" border="0">
<tr>
<td></td>
</tr>
</table>
<!--[if mso]></td><td><![endif]-->
<table class="aligntable2" border="0" cellpadding=
"0" cellspacing="0" align="left"
style=
"display:block; mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;"><tr><td height="20"></td></tr>
<tr>
<td width="180" align="center"> <img border="0" src=
"" width="180" height="180" /></td>
</tr>
<tr>
<td width="180" valign="middle" align="center"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #0b5ed7;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 16px;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 150%;letter-spacing: 0px;">
<center>
TEST
</center></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
<tr>
<td width="180" height="255" valign="top"
align="left" style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #000000;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 12px;font-weight: normal;text-decoration: none;outline: none;line-height: 120%;"> TEST</td>
</tr>
<tr>
<td align="center" width="180"><a target="_blank" style=
"FONT-SIZE: 16px; COLOR: #0e5fd8; -webkit-text-size-adjust:none; FONT-FAMILY: Verdana, Arial; text-decoration:none; line-height:16px;"
href=
"http://www.philips.at/c-p/NTRX100_12/?origin=3_at_de_spoilyourself2__ot_dec__hero_img&elqtrack=true"> <img src=
""
border="0" /></a></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
</table>
<!--[if mso]></td><td><![endif]-->
<table class="aligntable3" border="0" cellpadding=
"0" cellspacing="0" align="right"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;"><tr><td height="20"></td></tr>
<tr>
<td width="180" align="center"><img border="0" src=
"" width="180" height="180" /></td>
</tr>
<tr>
<td width="180" valign="middle" align="center"
style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #0b5ed7;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 16px;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 150%;letter-spacing: 0px;">
<center>
TEST
</center></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
<tr>
<td width="180" height="255" valign="top"
align="left" style=
"mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse;color: #000000;font-family: Verdana,Arial,Helvetica,sans-serif;font-size: 12px;font-weight: normal;text-decoration: none;outline: none;line-height: 120%;">TEST </td>
</tr>
<tr>
<td align="center" width="180"> <img src=
"" alt=
width="50"
border="0"/></a></td>
</tr>
<tr>
<td height="20" width="180"></td>
</tr>
</table></td>
</tr>
</table>
<!--END TD -->
</div>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</td>
</tr>
</table>
</body>
</html>
关于background - VML 后台代码中断对齐 Outlook 电子邮件表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27253019/
我是 os 2 的新手,所以真的不知道从哪里开始。是否可以编写一个 WatchOs 2 应用程序,它将在后台运行并每小时唤醒一次?网上没有那么多可用的信息,但到目前为止我所看到的表明不可能编写后台应用
如何将 url 背景图像添加到渐变中并具体定位?因为梯度本身被当作图像 CSS background: linear-gradient(to bottom, #98cb01 2%,#60a822 10
我是 android 开发的新手,正在开发我的第一个 android 应用程序。我在布局的 xml 中设置了 View 的背景颜色,如下所示。 android:background="@+color/
为了尽可能简洁地使用样式,如果使用双像素密度设备(例如 iPhone 4)查看我的页面,我宁愿不使用包含的媒体查询样式表。 话虽如此,如果我只是做这样的事情就可以了吗? .icon-1 { bac
我有一个由 62 张 91 * 91 像素的图像组成的 Sprite ,这使得整个图像为 91 * 5642 像素。它们以动态网格的形式显示,该网格会根据用户/指针的移动而增长和缩小。有时,一个元素(
我一直在尝试制作一款使用 Xbox One Kinect (V2) 的 Unity 游戏。 我遵循了本教程中的说明: http://www.imaginativeuniversal.com/blog/
看来firefox会自动组合一些东西,例如它需要单独的css值,例如“border-color”,“border-width”并将它们全部转储到“border”中..这使jquery变得很痛苦因为 .
我正在构建我的第一个 Chrome 扩展程序。我浏览了 Chrome 开发人员文档,但我无法理解几个主题。 我的理解: 有两个 Action : 浏览器操作(地址栏外的按钮) 页面操作(地址栏内的按钮
我的后台监听器是 chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) 在chrome.conte
哪个更有效: 我正在尝试找出哪种提供半透明背景的方法更有效/更快: background-color: rgba(255, 255, 255, .12); 或者 background-image: u
我想要一个有 tr 作为黑色背景的表格,里面有一个白色背景的表格。
我在我的主页上放了一个背景。它可以在除 android chrome 之外的所有浏览器上正确显示。这是我的 CSS: body.path-frontpage { background-imag
我正在尝试对我的背景图像应用滤镜,但是我遇到了 CSS 属性 URL 和线性渐变的问题。我想要的背景图片 .bg-image-full { background: no-repeat center
在样式部分的 chrome 中使用谷歌开发者控制台时,它会立即为我提供“在我键入时”的背景颜色属性。几个月前,它一直在提供我更喜欢的一般属性(property)“背景”。 是否有机会自定义这些提示,或
我正在尝试实现 faux column网站上的布局。简而言之,它涉及在包含两个垂直列的 div 上平铺背景图像,使其看起来像两个列一直延伸到底部。 我的专栏如下所示: XXXX MMMM XXXX
这是一个 example .我想裁剪背景图像,然后将裁剪图像用作更大(尺寸)元素的背景。我的意思是 div 比它的背景大,我不需要重复。现在,当 background-repeat 取消注释时,元素消
CSS3 声明 background-clip 和 background-origin 似乎对背景有相同的效果。它们似乎都将背景限制在相对于 HTML 元素的某个区域,所以我想知道这两个声明在功能上是
我正在为图片库制作缩略图页面。缩略图预览作为 完成 float 具有固定的方形尺寸。 然而,缩略图本身不一定是正方形或相同大小,它们具有它们所代表的大图像的属性。 为了让它看起来不错,我想在正方形中
这个问题在这里已经有了答案: Get a CSS value with JavaScript (8 个答案) 关闭 6 年前。
你好, 就像我在标题中所说的 background-image:none; 不起作用,因为使用 css3 background-image:url('...'); 返回一个新层每次文件都是新的。我正在
我是一名优秀的程序员,十分优秀!