html - 减少 UI 中按钮周围的间距
问题描述
我正在为 UI 使用 VMware 清晰度,并希望减少按钮左侧和右侧的间距,即 PDF 按钮、ZIP 按钮。我尝试将填充设置为 0,甚至是负填充,但它不起作用。下面是代码:
<button type="button" class="btn btn-sm" style="margin: 0%; padding: 0%;" (click)="pdf_report(hist)">
<clr-icon class="is-solid" shape="file"></clr-icon>PDF
</button>
解决方案
似乎您的元素是根据 flex 行为显示的。首先,您应该使用您的开发工具查找有关button.btn.btn-sm元素的样式的实现位置。如果您无法更改它,您可以尝试通过添加页面/元素/查看您的 css 代码来使用重要属性覆盖它,如下所示:
button.btn.btn-sm{
display:inline-block!important;
flex:none!important;// this will break the flex behavior
padding:0!important;
width:auto;
}
推荐阅读
- liferay - liferay 搜索容器分页问题
- graphviz - 如何在(简单)有向图中强制使用直边?
- c# - C#:具有可变数量参数的函数列表
- ios - 我可以从企业帐户中删除应用程序 ID 并在标准开发人员帐户中重复使用它吗
- java - jUnit @beforeAll 不工作
- android - startAnimation() 有线程吗?
- html - 如何从后端显示我的日期到角度材料日期选择器字段?
- linux - Bash 脚本从脚本输出到文件失败,但在 bash 中有效
- perl - 加入数组元素,然后从结果中删除空格
- android - 从图库中选择图像并上传到我的计算机/服务器上的数据存储