Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.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
Html 如何定位引导容器?_Html_Css_Twitter Bootstrap_Css Position - Fatal编程技术网

Html 如何定位引导容器?

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。我努力想弄明白这一点。但我还是不能

这是我当前代码输出的一个sreenshot。但这不是我想要的

我想要的是,这个红色的
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">&lsaquo;</a>
            <a class="right carousel-control" href="#homepage-feature" data-slide="next">&rsaquo;</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中:

    • 。添加了该类{
      位置:绝对位置;
      }
    • 并添加到css请求表单中:

      。请求表单{float:right;
      保证金:10px 50px 10px自动;
      位置:相对;


    这不是我所期望的。引导列与此要求不匹配。实际上我想将此红色div放置在传送带上。清楚吗?您的问题以前不清楚,但您现在添加的图片有帮助。在编辑我的答案时检查此小提琴:陛下,实际上我需要将此红色
    div
    放入引导容器中当它位于传送带上方时。可以这样做吗?谢谢。陛下,我想保持我的内容正确对齐。这就是为什么我需要在bootstrap
    。container
    下获取此红色
    div
    。请检查此项以明确理解。抱歉,我真的不太明白您到底想要什么。我很乐意帮助您,但是r现在我真的很困惑。不,我想要旋转木马上方的这个红色div。为什么不在.item中添加一个id,并将该id的css属性更改为背景图像