css - 我需要从 Twitter 的 Bootstrap 导入什么来扩展 .panel 类?

标签 css twitter-bootstrap sass

给定以下 .scss 文件

@import 'vendor/bootstrap-sass/bootstrap';                                                                                                                               

.item1 {                                                                                                                                                                 
  @extend .row;                                                                                                                                                          
}                                                                                                                                                                        
.item2 {                                                                                                                                                                 
  @extend .panel;
}

为什么扩展.row可以编译但是扩展.panel编译失败?

错误输出:

Syntax error: ".item2" failed to @extend ".panel".                                                                                                                       
          The selector ".panel" was not found.                                                                                                                       
          Use "@extend .panel !optional" if the extend should be able to fail.

最佳答案

.panel 存在于Boostrap 3.0 components , 但不适用于 Boostrap 2.3 .检查您的版本并更新您的 @extend!

关于css - 我需要从 Twitter 的 Bootstrap 导入什么来扩展 .panel 类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24737530/

相关文章:

javascript - JSP 中的预输入

css - Bootstrap 容器中的内容高度为 100%

angular - 在单个页面中更改 ionic 标签的字体大小 - Ionic

CSS/Sass 在背景图像上设置不透明度为 0.5 的背景色

css - 带有reactjs的bootstrap scss不添加bootstrap类

javascript - React 不会在 Safari 或 IE 或任何移动网络浏览器中加载图像

javascript - 高级翻转以显示额外选项

css - 创建动态 div Razor MVC

jquery - 通过图标调用操作不起作用

css - 使用背景大小 : cover 时移动背景位置