- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我目前有一个网站使用来自 Codecademy“如何制作网站”教程的 bootstrap 中的 jumbotron 功能。
在其中,它使用以下 html:
<div class="jumbotron">
<div class="container">
<h1>Heading</h1>
<p>Tagline</p>
<a href="#About"><button type="button" class="btn btn-lg btn-danger">Learn More</button></a>
<!--<a href="#">Learn More</a>-->
</div>
</div>
和以下 CSS:
.jumbotron {
background-image:url("flight.jpg");
height: 500px;
background-repeat: no-repeat;
background-size: cover;
margin-bottom:0px;
}
.jumbotron .container {
position: relative;
top:100px;
}
.jumbotron h1 {
color: #CC0000;
font-size: 48px;
font-family: 'Shift', sans-serif;
text-shadow:none;
}
.jumbotron p {
font-size: 20px;
color: #CC0000;
text-shadow:none;
}
当使用较大的显示器时,背景图像无法正确缩放,并且图像在 div 内的尺寸会增加,但 div 保持不变。结果看起来像是对图像进行了缩放,而不是图像保持完整。
知道如何让它在更大的显示器上正确缩放吗?
最佳答案
更改为
哦,很抱歉误解了你的问题,你需要编辑 的 css。jumbotron
需要被覆盖并居中。
.jumbotron { background-size: cover; background-position: center; }
在 Jumbotron 周围添加 Container Div!
<div class="container">
<div class="jumbotron">
<div class="container">
<h1>Heading</h1>
<p>Tagline</p>
<a href="#About"><button type="button" class="btn btn-lg btn-danger">Learn More</button></a>
<!--<a href="#">Learn More</a>-->
</div>
</div>
</div>
关于html - 如何在更大的显示器上缩放 jumbotron bootstrap?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27239479/
我正在学习网页设计和 js。在我的网页上,我将 jumbotron h2 中的默认颜色定义为黑色。 .jumbotron h2{ text-align: center; color:b
尝试更改我的 jumbotron 的背景和颜色,但没有任何反应。padding有效,但 background没有。 我的 CSS: .jumbotron { padding:70px 30px
我无法弄清楚为什么我的超大屏幕容器会覆盖整个页面。我正试图让超大屏幕在“找到你的大学”之前停下来。 其次,我也无法将搜索栏移动到超大屏幕的中间。谁能帮忙?我是 HTML、CSS 和 Bootstrap
我正在尝试缩小社交图标之间的间隙/边距,并使其在文本下方居中。 Jumbotron 代码如下: div class="jumbotron"> A blog to explore, learn
这个问题在这里已经有了答案: Bootstrap Jumbotron not becoming full width of Body (7 个答案) How to make a full-widt
Bootstrap Jumbotrons 在我的网站上超出了容器,这意味着移动版本上的导航栏没有填满屏幕。我没有超大屏幕的其他页面不会出现此问题。 我尝试使用卡片代替,但是当我把它放在文本以外的任何东
我制作了这个登陆页面,效果很好。背景图片覆盖了页面,看起来很棒。我离开它,一天后回来,它看起来不一样了。我看不出它的原因。图像根本不会出现在标题的文本后面(检查图片)。
我想将超大屏幕设置为 0.5 不透明度。 En 1
我目前正在使用最新版本的 bootstrap 3.0.0 问题很简单。在 jumbotron 容器中,我使用如何将文本与 Logo 居中对齐 我已经玩了几个小时,使用 col-md-* 并且运气不佳。
我是网络开发的新手,在使用 bootstrap/CSS 时遇到了一些麻烦。我试图在默认 Bootstrap 超大屏幕后面有一个背景图像。最重要的是,我似乎也根本无法显示图像。我有点迷路了。任何帮助将不
我正在尝试将视频嵌入到引导超大屏幕中,但它并没有出现在我目前拥有的代码的任何地方。我错过了什么?
简单的 Bootstrap 超大屏幕... .jumbotron-page { height:300px; } 我需要在移动/小型设备上将高度更改为 100px,所以我明白了...... .jumbo
我正在使用 Bootstrap 为网站创建超大屏幕,但我遇到了超大屏幕无法在小屏幕上正确调整大小的问题。 这是我的代码 HTML
HTML: Toggle navigation
想问一下如何在不影响字体和按钮的不透明度的情况下,改变 Jumbotron 的不透明度使其全宽? .jumbotron-special{ text-align: center; bac
我有一个使用 Bootstrap 3 和 Jumbotron header 的 Wordpress 站点。我对使用 skrollr.js 的导航和背景有视差效果。 我为媒体查询 (768px) 设置了
我正在尝试获取以下代码来为超大屏幕背景加载随机图像,但没有成功。我只是不知道哪一部分是问题所在。超大屏幕本身充当基本 flex slider 的区域。我基本上希望 flex slider 的背景图像在
我在使用 BootStrap 时遇到了 Jumbotrons 的问题。我的页面上有 2 个 div,第二个应该占据剩余的屏幕尺寸。但是当我改变浏览器的高度和宽度时,它并没有相应地调整,因为 div 的
所以我不知道如何让这个 jumbotron div 具有指定的背景图像。以前我在另一个元素中使用它时它起作用了,但是当我将它导入另一个元素时它就停止显示了。其他一切正常,所以我虽然只是忘记了 css
似乎无法弄清楚如何在超大屏幕中使用 CSS 专门放置按钮。我使用了一些类,例如 text-left 或 pull-left,但它们并没有给我想要的外观。我想这是一些简单的 CSS,但我似乎无法理解。我
我是一名优秀的程序员,十分优秀!