0
我正在使用Bootstrap,这是我的第一次尝试。我试图在页面的左侧有一个菜单,但是一旦我们展开 - 我想让菜单位于桌面上。所以.....我也必须去做一个'过渡动画',这在我的CSS里也有。我在这里的墙上撞了我的头大约两天,但似乎不能得到它。有关我所做的事情的任何建议?菜单会向左 - 但它是在布局桌子上......Bootstrap中的菜单布局
@charset "utf-8";
/* CSS Document */
body {
background-color: black;
color: #E8E3E3;
}
.bgimage {
background-position: center center;
background-size: cover;
height: 100px;
color: #3279B6;
}
.table-striped>tbody>tr:nth-child(odd)>td,
.table-striped>tbody>tr:nth-child(odd)>th {
background-color: #3279B6;
}
@media all and (max-width: 500px) {
.item-list {
float: left;
width: auto;
padding: 10px;
background-color: #686868;
}
}
@media all and (min-width: 500px) {
.item-list div {
transition: all 1.5s;
float: left;
width: 20%;
padding: 10px;
background-color: #686868;
}
}
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Lewis Lab 1</title>
<!-- Bootstrap -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<header class="bgimage">
<div class="container">
<h1>My Todo App...</h1>
</div>
</header>
<div class="row">
<div class="container">
<div class="col-sm-12">
<div class="item-list">
<div class="item">
<img src="http://i.stack.imgur.com/KVkTq.jpg" style="width: 20px">
</div>
<div class="item">Todos</div>
<div class="item">Add</div>
<div class="item">Edit</div>
<div class="item">More</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="col-md-10 col-xs-offset-2 col-sm-offset-0">
<table class="table table-striped">
<div>
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Description</th>
<th>Create TIme</th>
<th>User Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Dog</td>
<td>Walk the dog</td>
<td>2 pm</td>
<td>[email protected]</td>
</tr>
<tr>
<td>2</td>
<td>Cat</td>
<td>Feed the cat</td>
<td>3:13 pm</td>
<td>[email protected]</td>
</tr>
<tr>
<td>3</td>
<td>School</td>
<td>Do Lab 1</td>
<td>6 pm</td>
<td>[email protected]</td>
</tr>
<tr>
<td>4</td>
<td>Work out</td>
<td>Go to gym</td>
<td>7:15 pm</td>
<td>[email protected]</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="container">
<div class="col-lg-12">
<div class="row">
<h1>Action Items</h1>
<form>
<label for="addTodo">Add Todo</label>
<input class="form-control" type="text" id="addTodo" placeholder="Add Todo">
<label for="details">Details</label>
<input class="form-control" type="text" id="details" placeholder="Add details">
<br>
<input class="btn btn-primary" type="submit" value="submit">
</form>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-1.11.3.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.js"></script>
</body>
</html>
我能得到什么,不是我想要的: