引导卡没有像示例中那样显示 [英] Bootstrap cards not showing like in examples

查看:27
本文介绍了引导卡没有像示例中那样显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我的 Bootstrap 卡看起来很奇怪?在示例中,它们看起来像带有边框和白色填充的卡片,但我的看起来像没有填充和白色背景的文本.

例如:

我不知道代码是否对您有帮助,但在这里:

.container {左:0;右:0;底部:-340px;文本对齐:中间;位置:绝对;}

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"><div class="容器"><div class="row"><div class="col-md-3"><div class="card"><img class="card-img-top" src="http://www.themdfactor.com/wp-content/uploads/2015/09/card1.jpg" alt="卡片图片上限"><div class="card-block"><h4 class="card-title">这是卡片#1</h4><p class="card-text">一些快速示例文本,用于构建卡片标题并构成卡片内容的大部分.</p><a href="http://v4-alpha.getbootstrap.com/components/card/" class="btn btn-primary">了解详情</a>

解决方案

它在我看来很好.您必须确保链接的是第 4 版样式表.

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css"integrity="sha384-y3tfxAZXuh4HwSYylfB+J125MxIs6mR5FOHamPBG064zB+AFeWH94NdvaCBm8qnd"crossorigin="匿名">

Why do my Bootstrap cards look weird? In the examples they look like cards with a border and white padding but mine look like text only without the padding and the white background.

For example:

I don't know if the code will help you but here it is:

.container {
  left: 0;
  right: 0;
  bottom: -340px;
  text-align: middle;
  position: absolute;
}

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="container">
  <div class="row">
    <div class="col-md-3">
      <div class="card">
        <img class="card-img-top" src="http://www.themdfactor.com/wp-content/uploads/2015/09/card1.jpg" alt="Card image cap">
        <div class="card-block">
          <h4 class="card-title">This is Card #1</h4>
          <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
          <a href="http://v4-alpha.getbootstrap.com/components/card/" class="btn btn-primary">Learn More</a>
        </div>
      </div>
    </div>
  </div>
</div>

解决方案

It shows up fine by me. You have to make sure that you are linking the version 4 style sheet.

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" integrity="sha384-y3tfxAZXuh4HwSYylfB+J125MxIs6mR5FOHamPBG064zB+AFeWH94NdvaCBm8qnd" crossorigin="anonymous">

这篇关于引导卡没有像示例中那样显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
前端开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆