CSS样式类不在Excel中组合 [英] CSS style class not combining in Excel

查看:249
本文介绍了CSS样式类不在Excel中组合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么Excel不能组合这些样式?

Why isn't Excel combining these styles?


Excel:

Excel:

IE:

>

示例jsFiddle: http://jsfiddle.net/ 3RtJj /

Example jsFiddle: http://jsfiddle.net/3RtJj/

HTML来源:

<html>
<style type="text/css">
.greenBack{background-color:#d7e4bc}
.redFont{color:red}
</style>
<table>
    <tr>
        <td>no style</td><td class="redFont">red font only</td>
    </tr>
    <tr>
        <td class="greenBack">green back only</td><td class="redFont greenBack">green back and red font</td>
    </tr>
</table>
</html>


推荐答案

有人有类似的问题此处。看起来好像excel只支持有一个类,如果有更多它只是忽略他们在一起。我建议有一个greenBackRedFont类设置这两个属性。

Someone had a similar problem Here. It seems as if excel only supports having one class, and if there is more it just ignores them all together. I would recommend having a greenBackRedFont class that sets both properties.

这篇关于CSS样式类不在Excel中组合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆