gpt4 book ai didi

html - 无法在 Bootstrap v3.1.1 中居中对齐 div

转载 作者:太空宇宙 更新时间:2023-11-04 12:01:03 25 4
gpt4 key购买 nike

我正在使用 Bootstrap v3.1.1 并尝试将 div 居中对齐但无法将 div 居中对齐

这是我的页面代码,我需要将其置于页面中心,但无法做到这一点,有人可以帮助我在中心形成 algin 吗

<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Animus A Blogging Category Flat Bootstarp Resposive Website Template | Home :: w3layouts</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all">
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Graphic Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
</head>
<body>
<div class="contact-top">
<div class="container">
<h2>Log in</h2>
<div class="contact">
<p></p>
<div class="contact-down">
<div class="col-md-6 contact-info" style="margin-left:auto;margin-right:auto;">
<form>
<input type="text" name="your name" placeholder="USER NAME" class="input"><br><br>
<input type="password" name="your email" placeholder="PASSWORD" class="input">
<div class="clearfix"> </div>
<input type="submit"value="SEND" />
</form>
</div>
<div class="clearfix"> </div>

</div>
</div>
</div>
</div>
</body>
</html>

最佳答案

你可以添加 col-md-offset-3 Contact-info div 如下吗

<div class="col-md-6 col-md-offset-3 contact-info">
<form>
<input type="text" name="your name" placeholder="USER NAME" class="input"><br><br>
<input type="password" name="your email" placeholder="PASSWORD" class="input">
<div class="clearfix"> </div>
<input type="submit"value="SEND" />
</form>
</div>

关于html - 无法在 Bootstrap v3.1.1 中居中对齐 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29804578/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com