Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/395.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
Javascript 带有引导式分页按钮的数据表_Javascript_Jquery_Html_Css_Twitter Bootstrap - Fatal编程技术网

Javascript 带有引导式分页按钮的数据表

Javascript 带有引导式分页按钮的数据表,javascript,jquery,html,css,twitter-bootstrap,Javascript,Jquery,Html,Css,Twitter Bootstrap,我创建了一个包含如下数据表的表: HTML <table id="example" class="table table-striped table-bordered" width="100%" cellspacing="0"> <thead> <tr> <th>Name</th> <th>Position</th> <th>Office</th> <th>Ag

我创建了一个包含如下数据表的表:

HTML

<table id="example" class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
  <th>Name</th>
  <th>Position</th>
  <th>Office</th>
  <th>Age</th>
  <th>Start date</th>
  <th>Salary</th>
</tr>
</thead>
<tbody>
<tr>
  <td>Tiger Nixon</td>
  <td>System Architect</td>
  <td>Edinburgh</td>
  <td>61</td>
  <td>2011/04/25</td>
  <td>$320,800</td>
</tr>
<tr>
  <td>Garrett Winters</td>
  <td>Accountant</td>
  <td>Tokyo</td>
  <td>63</td>
  <td>2011/07/25</td>
  <td>$170,750</td>
</tr>
<tr>
  <td>Ashton Cox</td>
  <td>Junior Technical Author</td>
  <td>San Francisco</td>
  <td>66</td>
  <td>2009/01/12</td>
  <td>$86,000</td>
</tr>
<tr>
  <td>Cedric Kelly</td>
  <td>Senior Javascript Developer</td>
  <td>Edinburgh</td>
  <td>22</td>
  <td>2012/03/29</td>
  <td>$433,060</td>
</tr>
<tr>
  <td>Airi Satou</td>
  <td>Accountant</td>
  <td>Tokyo</td>
  <td>33</td>
  <td>2008/11/28</td>
  <td>$162,700</td>
</tr>
</tbody>
</table>
我想知道如何更改分页按钮的样式(比如说
Previous
1
Next
)以使用另一种背景色。我试着检查元素,看看哪个CSS类影响了它们,然后试着编辑它们,但我没有让它工作。

按钮实际上是包装在名为
%table\u name%\u previous
%table\u name%\u next
li
中的链接。你可以这样瞄准他们

CSS


尝试此操作,使用“重要信息”覆盖引导

.pagination>li>a, .pagination>li>span{
  border:1px solid red !important;
}

如果我有多页,页码是多少?
#example_previous a {
  background-color:black;
}

#example_next a {
  background-color:red;
}
.pagination>li>a, .pagination>li>span{
  border:1px solid red !important;
}