栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

相当于在Outlook中浮动

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

相当于在Outlook中浮动

使用width =“”而不是CSS在每个对齐的表格上设置宽度。

一个有效的示例:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title></title>  <style type="text/css">    table td { border-collapse: collapse; }    .msoFix { mso-table-lspace:-1pt; mso-table-rspace:-1pt; }  </style></head><body  bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">  <tr>    <td align="center">      <div >        <table  width="320" cellpadding="0" cellspacing="0" align="left" bgcolor="#CCCCCC">          <tr> <td width="15" bgcolor="454545">&nbsp;</td> <td width="290" bgcolor="454545" align="left" >&nbsp;<br>Table 1<br>...<br>&nbsp; </td> <td width="15" bgcolor="454545">&nbsp;</td>          </tr>        </table>        <table  width="320" cellpadding="0" cellspacing="0" align="left" bgcolor="#EEEEEE">          <tr> <td width="15" bgcolor="959595">&nbsp;</td> <td width="290" bgcolor="959595" align="left" >&nbsp;<br>Table 2<br>...<br>&nbsp; </td> <td width="15" bgcolor="959595">&nbsp;</td>          </tr>        </table>      </div>    </td>  </tr></table></body></html>

此外,Outlook在对齐表之间放置4-5像素的间隙。添加此值会将其减少到大约1px:

<style type="text/css">   .msoFix {      mso-table-lspace:-1pt;      mso-table-rspace:-1pt;   }</style>

要完全摆脱它,您必须在表中添加边框(另一个Outlook怪癖hack)。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/432629.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号