css - 从 ShinyWidgets 更改 AwesomeCheckbox 的边距间距
问题描述
我需要在 Shiny 项目中更改 awesomeCheckbox() 输入项的顶部和底部间距,因为我有很多是垂直放置的,而且它们之间的空白太多。
在我的浏览器上使用检查元素我可以看到我需要将类的元素"checkboxbs checkbox-bs checkbox-bs-primary"
从更改style="margin-top: 10px; margin-bottom: 10px;"
为style="margin-top: 0px; margin-bottom: 0px;"
我尝试使用以下类更改 CSS,但无济于事:
tags$head(tags$style("
.checkbox {display: inline-block; margin-top: 0px; margin-bottom: 0px; !important}
.col-sm-4 {display: inline-block; margin-top: 0px; margin-bottom: 0px; !important}
.checkboxbs {display: inline-block; margin-top: -20px; margin-bottom: 0px; !important}
.checkbox-bs.input {margin-top: 0px; margin-bottom: 0px; !important}
.checkbox-bs {margin-top: 0px; margin-bottom: 0px; top:0px; bottom:0px; !important}
.checkbox-bs-primary {margin-top: 0px; margin-bottom: 0px; top:0; bottom:0px; !important}
.checkboxbs.checkbox-bs.checkbox-bs-primary {margin-top: 0px; margin-bottom: 0px;}
.form-group {margin-top: 0px; margin-bottom: 0px;}
.shiny-input-container {margin-top: 0px; margin-bottom: 0px; !important}
.form-group.shiny-input-container {margin-top: 0px; margin-bottom: 0px; !important}
.shiny-bound-input {margin-top: 0px; margin-bottom: 0px; !important}
")),
解决方案
推荐阅读
- rust - 有没有办法在 Rust 中用“0x”正确证明十六进制数?
- python - 减少循环执行时间python
- c# - Unity3d中使用MySQL,填充数据表
- ios - 如何在 iOS 10+ 中更换设备旋转的渐变背景
- c++-winrt - 如何返回数组 asyc,在 C++/WinRT 中编写 Windows 运行时组件
- android - ARCore 非常不稳定地检测图像
- python - 如何用特殊字符python替换字符串列表中的完全匹配?
- python - 带有容差参数的 Pandas merge_asof 失败
- laravel - Eloquent ORM 获取最新项目查询
- sql-server - 将具有多个联系人的帐户显示为单独的列而不是行?