使用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>
答案 0 :(得分:1)
您可以按如下方式添加col-md-offset-3 Contact-info div
filer
答案 1 :(得分:0)
在div上设置宽度。
import random
x = int(raw_input("Number(1-6): ")) # note I made x an int
while True:
y = random.randint(1, 6)
if x != y: break