Css 如何在引导中为响应表着色?
我有一个html代码:Css 如何在引导中为响应表着色?,css,twitter-bootstrap,Css,Twitter Bootstrap,我有一个html代码: <html> <head> <link rel="stylesheet" type="text/css" href="SearchCustomerStyle.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <link rel="stylesheet" hr
<html>
<head>
<link rel="stylesheet" type="text/css" href="SearchCustomerStyle.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</head>
<body>
<!-- Header-->
<div class="container">
<nav role="navigation" class="navbar navbar-inverse navbar-fixed-top">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collection of nav links, forms, and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="EyeofHeaven.html">Home</a></li>
<li><a href="#">About</a></li>
<li class="dropdown active">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Search<b class="caret"></b></a>
<ul role="menu" class="dropdown-menu">
<li><a href="#">Search Form(Customer)</a></li>
<li><a href="#">Search Form(Vehicle)</a></li>
</ul>
</li>
</ul>
</div>
</nav>
</div>
<!-- Search form customer-->
<div class="searchcustomer">
<ul class="list-group">
<li class="list-group-item active"><span class="glyphicon glyphicon-th-list"></span><span> Search Customer</span></li>
<li class="list-group-item">
<input type="text" size="20" class="form-control" placeholder="Search ID">
</li>
<li class="list-group-item">
<select class="form-control" id="Regions">
<option>Regions</option>
</select>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-primary"><span class="glyphicon glyphicon-search"></span>Search Info</button>
</li>
</ul>
</div>
<!-- Information Table-->
<div class="bs-example">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Row</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Biography</th>
<th>Biography</th>
<th>Biography</th>
<th>Biography</th>
<th>Biography</th>
<th>Biography</th>
<th>Biography</th>
<th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th><th>Biography</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>John</td>
<td>Carter</td>
<td>johncarter@mail.com</td>
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at, luctus dui.</td>
</tr>
<tr>
<td>2</td>
<td>Peter</td>
<td>Parker</td>
<td>peterparker@mail.com</td>
<td>Vestibulum consectetur scelerisque lacus, ac fermentum lorem convallis sed. Nam odio tortor, dictum quis malesuada at, pellentesque.</td>
</tr>
<tr>
<td>3</td>
<td>John</td>
<td>Rambo</td>
<td>johnrambo@mail.com</td>
<td>Integer pulvinar leo id risus pellentesque vestibulum. Sed diam libero, sodales eget sapien vel, porttitor bibendum enim.</td>
</tr>
<tr>
<td>4</td>
<td>John</td>
<td>Rambo</td>
<td>johnrambo@mail.com</td>
<td>Integer pulvinar leo id risus pellentesque vestibulum. Sed diam libero, sodales eget sapien vel, porttitor bibendum enim.</td>
</tr>
<tr>
<td>5</td>
<td>John</td>
<td>Rambo</td>
<td>johnrambo@mail.com</td>
<td>Integer pulvinar leo id risus pellentesque vestibulum. Sed diam libero, sodales eget sapien vel, porttitor bibendum enim.</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
我如何使我的表格设置为白色的颜色背景,当我把我的表格放入网页时,我的表格背景也是我设置在身体中的背景图像。如何将表格的背景色设置为白色?使用css
背景色:白色代码>您需要更新.table的css,或者向表标记中添加新类,并向其添加以下css:
background-color: white;
只需使用
CSS:
.table-responsive{
max-width: 1200px;
margin-top:-220px;
margin-left:200px;
max-width: auto;
background-color: white; // Can use hexadecimal color here too (#FFFFFF)
}
@media all and (max-width: 1028px ){
body {
background:url(http://i.stack.imgur.com/DafcS.jpg) no-repeat;
background-size: contain 100%;
}
}
更新@media:
.table-responsive{
max-width: 1200px;
margin-top:-220px;
margin-left:200px;
max-width: auto;
background-color: white; // Can use hexadecimal color here too (#FFFFFF)
}
@media all and (max-width: 1028px ){
body {
background:url(http://i.stack.imgur.com/DafcS.jpg) no-repeat;
background-size: contain 100%;
}
}
.我认为它应该是。表响应{{背景色:白色;}
哦,我明白了,你不能更改图像背景,你必须使用图像编辑应用程序,而不是开始工作,先生,谢谢。嗯,我如何更改我的背景图像,使我的背景大小达到100%,先生?如果我在移动设备上访问,背景将无法完全适合我的网页。你可以使用它并操纵背景。