Html 如何定位引导容器?
我正在尝试在引导转盘上定位内容DIV。我努力想弄明白这一点。但我还是不能 这是我当前代码输出的一个sreenshot。但这不是我想要的 我想要的是,这个红色的Html 如何定位引导容器?,html,css,twitter-bootstrap,css-position,Html,Css,Twitter Bootstrap,Css Position,我正在尝试在引导转盘上定位内容DIV。我努力想弄明白这一点。但我还是不能 这是我当前代码输出的一个sreenshot。但这不是我想要的 我想要的是,这个红色的DIV应该位于旋转木马的右侧。当放置红色的DIV时,它应该仍然在引导容器中以正确保持我的内容的宽度 这是我到目前为止的标记- <div class="banner-content"> <div id="homepage-feature" class="carousel slide"> <ol
DIV
应该位于旋转木马的右侧。当放置红色的DIV
时,它应该仍然在引导容器中
以正确保持我的内容的宽度
这是我到目前为止的标记-
<div class="banner-content">
<div id="homepage-feature" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#homepage-feature" data-slide-to="0" class="active"></li>
<li data-target="#homepage-feature" data-slide-to="1"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="http://lorempixel.com/1500/600/abstract">
<div class="container">
<div class="carousel-caption">
<h1>Changes to the Grid</h1>
<p>Bootstrap 3 still features a 12-column grid, but many of the CSS class names have completely changed.</p>
</div>
</div>
</div>
<div class="item">
<img src="http://placehold.it/1500X600">
<div class="container">
<div class="carousel-caption">
<h1>Percentage-based sizing</h1>
<p>With "mobile-first" there is now only one percentage-based grid.</p>
</div>
</div>
</div>
</div><!-- /.carousel-inner -->
<!-- Controls -->
<a class="left carousel-control" href="#homepage-feature" data-slide="prev">‹</a>
<a class="right carousel-control" href="#homepage-feature" data-slide="next">›</a>
</div><!-- /#homepage-feature.carousel -->
<div class="request-form-holder container">
<div class="request-form">
</div>
</div>
</div>
对网格的更改
Bootstrap3仍然有一个12列的网格,但是许多CSS类名已经完全改变了
基于百分比的上浆
“移动优先”现在只有一个基于百分比的网格
用我现在的密码
我的预期结果应该是这样的-
希望有人能帮助我。多谢各位 将css更改为:
.request-form {
width: 300px;
height: 300px;
background: red;
color: #fff;
z-index: 100;
position: absolute;
top: 0;
right: 10%;
}
检查此项
刚刚添加了float:right
到CSS中的class=“请求表单”
这是你想要做的吗
替换为HTML:
。添加了该类{ 位置:绝对位置; }
- 并添加到css请求表单中:
。请求表单{float:right; 保证金:10px 50px 10px自动; 位置:相对;
div
放入引导容器中当它位于传送带上方时。可以这样做吗?谢谢。陛下,我想保持我的内容正确对齐。这就是为什么我需要在bootstrap。container
下获取此红色div
。请检查此项以明确理解。抱歉,我真的不太明白您到底想要什么。我很乐意帮助您,但是r现在我真的很困惑。不,我想要旋转木马上方的这个红色div。为什么不在.item中添加一个id,并将该id的css属性更改为背景图像