整齐排放Css,容器宽度NaN%

时间:2014-07-24 06:04:20

标签: css responsive-design media-queries bourbon neat

我创建了一个演示整洁的项目并在Sass中为它提供了列。 这是代码。

@import "../bourbon/bourbon"; // 
@import "../neat/neat-helpers"; 


$column: 0px;
$gutter: 0px;
$grid-columns: 10;
$max-width: 100%;


$large: new-breakpoint(max-width 1025px 10);
$medium: new-breakpoint(max-width 1024px 8);
$small: new-breakpoint(max-width 640px 4);

@import "../neat/neat";
body
{
    margin: 0;
    padding: 0;
} 

.outerContainer
{
    @include outer-container;
}

.leftCol
{
    @include span-columns(5);
    background-color: red;
    color:white;
    padding:10px;
    @include media($small) {
        @include span-columns(4);
    }


    @include media($medium) {
        @include span-columns(8);
    }


}
.rightCol
{
    @include span-columns(5);
    background-color: blue;
    color:white;
    padding:10px;   
    @include media($small) {
        @include span-columns(4);
    }

    @include media($medium) {
        @include span-columns(2);
    }



}

现在当我看到 emmited Css时,这很难过

 margin-right: NaN%;
  width: NaN%; }

为什么显示 Nan%? 请告诉我我在哪里做错了? 感谢。

1 个答案:

答案 0 :(得分:1)

请检查导入的CSS文件的内容。

NaN%代表" not-a-number"并在出现任何计算错误时出现,例如将某事除以0。