Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 非法嵌套:导入指令下不能嵌套任何内容_Css_Ruby On Rails_Ruby_Twitter Bootstrap - Fatal编程技术网

Css 非法嵌套:导入指令下不能嵌套任何内容

Css 非法嵌套:导入指令下不能嵌套任何内容,css,ruby-on-rails,ruby,twitter-bootstrap,Css,Ruby On Rails,Ruby,Twitter Bootstrap,我正在使用Rails4.2和引导sass->3.2.0GEM。我将css转换为sass并添加到application.css.sass文件中 Im获取非法嵌套:导入指令下不能嵌套任何内容。 @import "bootstrap" height: 5px border-top: 0 background: #c4e17f border-radius: 5px 关于我为什么会遇到这个问题,有什么想法吗。试试这个: 不要缩进样式、创建类或将其放入html标记中 例如: @impor

我正在使用Rails4.2和引导sass->3.2.0GEM。我将css转换为sass并添加到application.css.sass文件中

Im获取非法嵌套:导入指令下不能嵌套任何内容。

@import "bootstrap"

  height: 5px
  border-top: 0
  background: #c4e17f
  border-radius: 5px
关于我为什么会遇到这个问题,有什么想法吗。

试试这个:

不要缩进样式、创建类或将其放入html标记中

例如:

@import "bootstrap"

body {
    height: 5px
    border-top: 0
    background: #c4e17f
    border-radius: 5px
}


从您的代码示例中,我看到您没有将样式与任何类或id关联

它看起来像

.container
  height: 5px       
  border-top: 0
  background: #c4e17f
  border-radius: 5px
.container
  height: 5px       
  border-top: 0
  background: #c4e17f
  border-radius: 5px