【问题标题】:CSS not rendering because of multi-classes由于多类,CSS 不呈现
【发布时间】:2012-04-01 05:45:44
【问题描述】:

我的 CSS 有问题。在现代浏览器(如 FF、chrome、IE9 和 IE8)中一切正常。现在问题出现在 IE6(当然)和 IE7 上。

我会说我 80% 的 CSS 在这两个浏览器中都被忽略了。有关使用 HTML5 文档类型的信息。

例如:

<div id="bgVideoContainer">
    <div class="borderTop"></div>
    <div id="content">
        <div class="boxes fleft">

还有css:

.borderTop {
       position: relative;
       top: 0;
       border-top: 1px solid black;
 }

.boxes {
        margin: 0 0 15px;
        padding: 0 25px;
        width: 924px;
 }

.fleft { float:left; }

还有很多这样的结构:

<div id="videoCanvas">
    <div class="column-left">
        <object id="videoContainer"

#videoCanvas .column-left #videoContainer {
        width:600px;
        height:473px;
        background-color:#000;
        color:#fff;
 }

在 IE7 和 6 上都没有显示...。我很困惑,我应该怎么做才能解决这个问题??

【问题讨论】:

    标签: css internet-explorer-7 internet-explorer-6 cross-browser compatibility


    【解决方案1】:

    你可以这样做

    您可以为IE6 and 7 创建单独的样式表。并对这些样式表使用必要的 .css 类。

    IE浏览器中使用开发工具(ctrl + F12)并相应地编辑类

    例如。

    <!--[if IE 7]>
        <link href="IE-7.css" rel="stylesheet" type="text/css">
    <![endif]-->
    

    【讨论】:

      【解决方案2】:

      IE6 到 IE8 无法识别 html5 元素。更多信息请点击here

      【讨论】:

        【解决方案3】:

        您是否尝试过更改 DOCTYPE 以检查这不是问题所在?

        另外,有没有机会链接到该作品?

        您的 CSS 中是否存在 IE 无法工作的地方?如果不是 DOCTYPE,则可能是某处损坏的样式。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2018-01-15
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多