【问题标题】:Skeleton CSS classes grids骨架 CSS 类网格
【发布时间】:2015-05-09 17:14:24
【问题描述】:

我正在使用 Skeleton.css 在 wordpress 中创建一个网格系统

本教程显示了以下标头的标记,在这里您可以看到徽标有 3 个类, - 五列和 clearfix

   <header>
        <div class="five columns clearfix">
    get_template_directory_uri(); ?>/img/logo.svg"></a>
        </div>
    </header>

但是当我查看 skellton css 时,我看不到“五”类所以我将其更改为 .five.columns 但他没有区别,我在 .five.columns 类周围创建了一个边框,它确实没有出现我错过了什么明显的东西吗?

  .one.column,
  .one.columns                    { width: 4.66666666667%; }
  .two.columns                    { width: 13.3333333333%; }
  .three.columns                  { width: 22%;            }
  .four.columns                   { width: 30.6666666667%; }
  .five.columns                   { width: 39.3333333333%; }
  .six.columns                    { width: 48%;            }
  .seven.columns                  { width: 56.6666666667%; }
  .eight.columns                  { width: 65.3333333333%; }
  .nine.columns                   { width: 74.0%;          }
  .ten.columns                    { width: 82.6666666667%; }
  .eleven.columns                 { width: 91.3333333333%; }
  .twelve.columns                 { width: 100%; margin-left: 0; }

  .one-third.column               { width: 30.6666666667%; }
  .two-thirds.column              { width: 65.3333333333%; }

  .one-half.column                { width: 48%; }

  /* Offsets */
  .offset-by-one.column,
  .offset-by-one.columns          { margin-left: 8.66666666667%; }
  .offset-by-two.column,
  .offset-by-two.columns          { margin-left: 17.3333333333%; }
  .offset-by-three.column,
  .offset-by-three.columns        { margin-left: 26%;            }
  .offset-by-four.column,
  .offset-by-four.columns         { margin-left: 34.6666666667%; }
  .offset-by-five.column,
  .offset-by-five.columns         { margin-left: 43.3333333333%; }
  .offset-by-six.column,
  .offset-by-six.columns          { margin-left: 52%;            }
  .offset-by-seven.column,
  .offset-by-seven.columns        { margin-left: 60.6666666667%; }
  .offset-by-eight.column,
  .offset-by-eight.columns        { margin-left: 69.3333333333%; }
  .offset-by-nine.column,
  .offset-by-nine.columns         { margin-left: 78.0%;          }
  .offset-by-ten.column,
  .offset-by-ten.columns          { margin-left: 86.6666666667%; }
  .offset-by-eleven.column,
  .offset-by-eleven.columns       { margin-left: 95.3333333333%; }

  .offset-by-one-third.column,
  .offset-by-one-third.columns    { margin-left: 34.6666666667%; }
  .offset-by-two-thirds.column,
  .offset-by-two-thirds.columns   { margin-left: 69.3333333333%; }

  .offset-by-one-half.column,
  .offset-by-one-half.columns     { margin-left: 52%; }

}

/* Larger than mobile */
@media (min-width: 400px) {}

非常感谢

【问题讨论】:

    标签: css grid-system skeleton-code


    【解决方案1】:

    这里有一些关于高度和颜色的样式以使其明显。你的 div 高度是 0px 吗?使用浏览器中的开发人员工具检查它 - Chrome Developer Tools website

    https://jsfiddle.net/p1w61hmt/.

    <header style="height: 100px; background: green;">
        <div class="five columns clearfix" style="height: 100%;">
        </div>
    </header>
    
    .five.columns { width: 39.3333333333%; }
    .columns { background: red; }
    

    这可能是一些粘贴错误,但您的 HTML 无效并且您的 css 看起来像一个不完整的 sn-p。

    【讨论】:

      猜你喜欢
      • 2013-03-10
      • 2017-11-05
      • 2015-03-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-12
      相关资源
      最近更新 更多