css - Change background-color of bootstrap's pagination
问题描述
I tried to change the background-color of pagination with !import
static/css/custom_css.css
.pagination>li.active>a {
background-color: orange !important;
}
The source code:
<nav aria-label="...">
<ul class="pagination">
<li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
<li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
...
</ul>
</nav>
I have import it on the top
<link rel="stylesheet" href="{% static 'simplemde/debug/simplemde.css' %}" />
I tested multiple colors, but it did not correspond
解决方案
它工作正常,但您需要simplemde.css
在调用后添加它,bootstrap.css
如下所示
.pagination>li.active>a {
background-color: orange !important;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="{% static 'simplemde/debug/simplemde.css' %}" />
<nav aria-label="...">
<ul class="pagination">
<li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
<li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
...
</ul>
</nav>
推荐阅读
- excel - 如何使用 If 函数向上或向下舍入
- google-app-engine - 将应用部署到谷歌应用引擎后无法加载应用
- docker - GitLab CI Cypress E2E 挂在“验证赛普拉斯”上
- kotlin - 过滤 Kotlin 对集合,使对内容不为空
- .net - 在 Azure 存储中使用队列
- ubuntu - 如何远程访问在我的机器上运行的服务器?
- javascript - 如何使用已在 if 语句中声明的变量在 else 语句中使用它
- php - 使用基于特定属性的值创建 WooCommerce 订单自定义字段
- kubernetes - Kubernetes 后端 Pod 端点为空白
- c# - 删除 HTTP 服务器和 X-Powered-By 标头