Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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
Css 调整Twitter引导的对象大小_Css_Html_Twitter Bootstrap - Fatal编程技术网

Css 调整Twitter引导的对象大小

Css 调整Twitter引导的对象大小,css,html,twitter-bootstrap,Css,Html,Twitter Bootstrap,我想把登录框放在中间。不知道如何在引导程序中完成。有人能说这是必须的吗 下面是我编写的代码。请纠正我 <div class="container-fluid"> <div class="starter-template"> <h1>Bootstrap starter template</h1> <p class="lead">Use this document as a way to quickly start a

我想把登录框放在中间。不知道如何在引导程序中完成。有人能说这是必须的吗

下面是我编写的代码。请纠正我

<div class="container-fluid">

  <div class="starter-template">
    <h1>Bootstrap starter template</h1>
    <p class="lead">Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.</p>
      <button type="button" class="btn btn-primary btn-lg">Register</button>
      <h3><strong>OR</strong></h3>
  </div>
<div class="col-sm-6">
    <form class="form-signin" style="text-align:center" role="form">
        <h2 class="form-signin-heading">Please sign in to Continue</h2>           
        <div class="col-lg-7"><input type="email" class="form-control text-center" placeholder="Domain ID" autofocus required></div>
        <div class="col-lg-7"><input type="password" class="form-control text-center" placeholder="Password" required></div>
        <p><button class="btn btn-lg btn-primary" type="submit">Sign in</button>
    </form>
    </div>
</div>

如果您只需要将登录Div居中,只需遵循基本的引导网格标准即可。 网格分为12列。要使跨越6列的div居中,需要距页面最左边的起始位置3列。i、 e列-sm-offset-3 我修改了您的代码以反映更改

<div class="container-fluid">
 <div class="starter-template text-center">
    <h1>Bootstrap starter template</h1>
    <p class="lead">Use this document as a way to quickly start any new project.
        <br>All you get is this text and a mostly barebones HTML document.</p>
    <button type="button" class="btn btn-primary btn-lg">Register</button>
    <h3>
        <strong>OR</strong>
    </h3>
 </div>
 <div class="col-sm-offset-3 col-sm-6">
    <form class="form-signin text-center" role="form">
        <h2 class="form-signin-heading">Please sign in to Continue</h2>
        <input type="email" class="form-control text-center" placeholder="Domain ID" autofocus required>
        <input type="password" class="form-control text-center" placeholder="Password" required>
        <br>
        <button class="btn btn-md btn-primary" type="submit">Sign in</button>
    </form>
  </div>
</div>
工作代码: