在淘宝发布宝贝,编辑好的代码如下:
<table width="750px" cellpadding="0" cellspacing="0" style="margin-top:10px; font-size:12px">
<tr>
<td style="vertical-align:middle"><div style="background:url(http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg); color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px">20M双线.NET3.5主机</div></td>
<td style="vertical-align:middle"><div style="background:url(http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg); color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px">20M双线.NET3.5主机</div></td>
<td style="vertical-align:middle"><div style="background:url(http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg); color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px">20M双线.NET3.5主机</div></td>
<td style="vertical-align:middle"><div style="background:url(http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg); color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px">20M双线.NET3.5主机</div></td>
<td style="vertical-align:middle"><div style="background:url(http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg); color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px">20M双线.NET3.5主机</div></td>
</tr>
</table>
发布过后发现background属性都不见了,过滤掉了
原因:淘宝编辑器不允许使用div的background属性,想用background属性就的话就要用table,代码如下:
<table width="750px" cellpadding="0" cellspacing="0" style="margin-top:10px; font-size:12px">
<tr>
<td style="vertical-align:middle"><table background="http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg" style="color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px"><tr><td>20M双线.NET3.5主机</td></tr></table></td>
<td style="vertical-align:middle"><table background="http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg" style="color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px"><tr><td>20M双线.NET3.5主机</td></tr></table></td>
<td style="vertical-align:middle"><table background="http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg" style="color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px"><tr><td>20M双线.NET3.5主机</td></tr></table></td>
<td style="vertical-align:middle"><table background="http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg" style="color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px"><tr><td>20M双线.NET3.5主机</td></tr></table></td>
<td style="vertical-align:middle"><table background="http://xhsjs0336.w39.mc-test.com/taobao/titlebg.jpg" style="color:White; height:23px; font-size:12px; text-align:center; width:138px; padding-top:5px; margin-top:5px"><tr><td>20M双线.NET3.5主机</td></tr></table></td>
</tr>
</table>
- 本文标题: 淘宝宝贝说明编辑器内过滤background的解决方案
- 文章分类:【Android】
- 非特殊说明,本文版权归【胡同里的砖头】个人博客 所有,转载请注明出处.
- 上一篇:ASP.NET动态生成XML文件节点控制等
- 下一篇: Winform 打包部署方法