Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.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
Twitter bootstrap 无法在引导中应用面板类_Twitter Bootstrap_Bootstrap 4 - Fatal编程技术网

Twitter bootstrap 无法在引导中应用面板类

Twitter bootstrap 无法在引导中应用面板类,twitter-bootstrap,bootstrap-4,Twitter Bootstrap,Bootstrap 4,在我的项目中,引导样式不适用于div和span类,但引导样式适用于按钮 <div> /*Can not apply style for panel*/ <div class="panel panel-default"> <div class="panel-body">A Basic Panel</div> </div> /*Style for button is pro

在我的项目中,引导样式不适用于div和span类,但引导样式适用于按钮

<div>
  /*Can not apply style for panel*/
  <div class="panel panel-default">
      <div class="panel-body">A Basic Panel</div>
  </div>
  /*Style for button is properly working.*/
  <button class="btn btn-primary">Save</button>
</div>

/*无法为面板应用样式*/
基本小组
/*按钮的样式正常工作*/
拯救

我相信您正在使用Bootstrap 4。v4中不推荐使用面板,因为它们引入了卡

为一个新的全方位组件——卡片,放下面板、缩略图和井

使用
.card
代替
.panel
.card body
代替
.panel body


基本小组
完整迁移详细信息:

  • .panel
    .card
    ,现在使用flexbox构建
  • .panel default
    已删除,无需更换
  • .panel group
    已卸下,无需更换<代码>。卡组不是替代品,它是不同的
  • .panel heading
    至.card header
  • 。面板标题
    。卡片标题
    。根据所需的外观,您可能还希望使用标题元素或类(例如
    .h3
    )或粗体元素或类(例如
    .font-weight bold
    )。请注意,
    .card title
    ,虽然名称类似,但产生的外观与
    .panel title
    不同
  • .panel body
    .card body
  • .panel footer
    .card footer
  • .panel primary
    .panel success
    .panel info
    .panel warning
    .panel danger
    已删除从$theme colors Sass地图生成的
    .bg-
    .border
    实用程序

我相信您正在使用Bootstrap 4。v4中不推荐使用面板,因为它们引入了卡

为一个新的全方位组件——卡片,放下面板、缩略图和井

使用
.card
代替
.panel
.card body
代替
.panel body


基本小组
完整迁移详细信息:

  • .panel
    .card
    ,现在使用flexbox构建
  • .panel default
    已删除,无需更换
  • .panel group
    已卸下,无需更换<代码>。卡组不是替代品,它是不同的
  • .panel heading
    至.card header
  • 。面板标题
    。卡片标题
    。根据所需的外观,您可能还希望使用标题元素或类(例如
    .h3
    )或粗体元素或类(例如
    .font-weight bold
    )。请注意,
    .card title
    ,虽然名称类似,但产生的外观与
    .panel title
    不同
  • .panel body
    .card body
  • .panel footer
    .card footer
  • .panel primary
    .panel success
    .panel info
    .panel warning
    .panel danger
    已删除从$theme colors Sass地图生成的
    .bg-
    .border
    实用程序

  • 更换我们的
    旧面板
    ,因此您应该使用
    ,而不是
    面板
    ,如下所示:

    //for example
    <div class="card">
      <div class="card-body">Basic card</div>
    </div>
    
    //例如
    基本卡
    
    更换我们的
    旧面板
    ,因此您应该使用
    ,而不是
    面板
    ,如下所示:

    //for example
    <div class="card">
      <div class="card-body">Basic card</div>
    </div>
    
    //例如
    基本卡