- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有两个按钮组,每个按钮在工具栏中包含两个按钮(总共 4 个按钮),并且希望每个按钮大小相同,并均匀分布在父 div 中(在本例中为 Bootstrap 列。是否有简单的方法来做到这一点?
JSfiddle:https://jsfiddle.net/jh9sdurg/
第一行是我正在使用的:标签长度不等的按钮,第二行是我希望它看起来如何的示例,但我只能使用等长的标签来实现(例如 'a '、'b'、'c')。
<body>
<div class="container">
<div class="row">
<div class="col-xs-3">
<div class="row">
<div class="btn-toolbar">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default active" id="qwerty">a<input id="qwerty" type="radio"></label><label class="btn btn-default" id="lButton1">aa<input id="qwerty" type="radio"></label>
</div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default active" id="qwerty">bbbbb<input id="qwerty" type="radio"></label><label class="btn btn-default" id="qwerty">bb<input id="qwerty" type="radio"></label>
</div>
</div>
</div>
</div>
<div class="col-xs-9" style="background: gray;">
col-xs-9
</div>
</div>
<div class="row">
<div class="col-xs-3">
<div class="row no-gutters">
<div class="btn-toolbar">
<div class="btn-group btn-block-3" data-toggle="buttons">
<label class="btn btn-default btn-block-2 active" id="qwerty">aa<input id="qwerty" type="radio"></label><label class="btn btn-default btn-block-2" id="qwerty">aa<input id="qwerty" type="radio"></label>
</div>
<div class="btn-group btn-block-3" data-toggle="buttons">
<label class="btn btn-default btn-block-2 active" id="qwerty">bb<input id="qwerty" type="radio"></label><label class="btn btn-default btn-block-2" id="qwerty">bb<input id="qwerty" type="radio"></label>
</div>
</div>
</div>
</div>
<div class="col-xs-9" style="background: gray;">
col-xs-9
</div>
</div>
</div>
最佳答案
您可以使用另一个 css 文件或内联样式来覆盖 Bootsrap 样式。我采用了一种简单快捷的方法来解决此问题,即添加 style = width:50%;
在每个按钮上。它们看起来像这样:
<label class="btn btn-default active" id="qwerty" style= "width: 50%">a<input id="qwerty" type="radio"></label>
<label class="btn btn-default" style= "width: 50%"id="lButton1">aaa<input id="qwerty" type="radio"></label>
我忘了补充一点,我将按钮包裹在 <div class = "col-xs-1"> </div>
中,如果你不添加,那么按钮将填充 <div class = "col-xs-3"></div>
他们原来是在。像这样:
关于html - 与 btn-toolbar 中的 Bootstrap btn-groups 大小相等,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41049349/
这是工具栏布局的 XML... 我正在使用支持库将工具栏用作我的操作栏。我在 onCreate 中这样做了... Toolbar mToolbar = (Toolbar)getLayoutInf
是否有任何属性/配置表明工具栏在向右溢出时应滚动到最后一项?我有一个垂直工具栏。它应该滚动到右侧的最后一项 我的配置如下: var toolbar = Ext.create('Ext.toolbar.
我使用 toolbar.Template() 和 Toolbar.Excel() 但 toolbar.excel() 不显示,只是 toolbar.Template() 显示。 .Excel(exce
我试图将 justify-content:center 放在工具栏内容的中心。在定位工具栏时,我可以看到扩展的元素,其中之一是 md-toolbar-row 给 justify-content:cen
我有一个toolbar.xml: 我的另一个 Activity 布局有一个包含标签: 我已经在我的扩展 AppCompatActivity 的 Activity 中实现了它: Toolbar
这是主要 Activity ,如 您可以清楚地看到 import android.support.v7.widget.Toolbar; 已经存在。 package app.com.example.an
我正在使用 TabLayout 折叠 ToolbarLayout,除了向上滚动时我的选项卡没有卡在工具栏下方之外,一切正常。 下面是我的代码:
有人可以向我解释一下它们之间的区别以及为什么它们不能互换吗? 导入 android.widget.Toolbar 会导致编译错误,而导入 android.support.v7.widget.Toolb
我收到这个错误 Caused by: java.lang.ClassCastException: android.support.v7.widget.Toolbar cannot be cast t
我正在寻找一种干净的方法来调整 Material-UI AppBar 后面的内容的偏移量。 我认为 theme.mixins.toolbar 会自动适应,但事实并非如此。 (使用这里描述的主题密度 P
我试过很多方法。但没有工作。期待这样的风格 ion-toolbar { contain: none; .toolbar-container { overflow: vi
我想在 md-toolbar 中使用 mf-tabs,我使用 Sithdown 在 https://github.com/angular/material/issues/1076 中提供的解决方案 它
Django 1.10 django-debug-toolbar == 1.5 新项目(我刚刚安装了Django)。尝试安装Django调试工具栏。 文档:https://django-debug-t
我正在升级我之前制作的一款游戏的用户界面,并且正朝着 Google 的 Material Design 方向发展。作为代码升级的一部分,我将向后兼容性支持库 android-support-v7-ap
您好,我是 Xamarin 的新手,我试图在 MainActivity 的 OnCreate() 中找到一个 View ,但找不到它(?)并且返回为 null。 protected override
是否可以将SAS脚本或宏分配给基本SAS中的工具栏按钮?即可以'dm'宏或sas脚本吗? 最佳答案 当然。这是一种方法: 转到“工具”->“自定义”。 选择“自定义”选项卡 通过单击“添加工具”(最左
我创建了一个简单的ALV网格,并用数据填充了网格,现在在选择屏幕之后显示了该网格。我没有使用自定义容器,而是以全屏显示网格。 是否有ALV网格对象的属性,该属性使工具栏具有通常位于网格顶部的按钮过滤器
我想为我的网站制作一个像谷歌工具栏这样的浏览器工具栏。它应该与所有流行的浏览器兼容。 我应该使用哪种语言来制作它?我可以使用任何示例/指南吗? 最佳答案 对于 Firefox,从这里开始:https:
我新下载了一个 jupyter 并尝试使用它。 但是,使用我的 mac 和 windows 计算机, 我在 jupyter 中看不到工具栏。 我尝试搜索以解决此问题,并尝试在 Mac 和 window
我在我的应用程序中使用工具栏。它应该如下所示: 但是,有时候,工具栏背景是错误的!我不知道为什么会这样...... 这是我的布局: ...... 这是我的工具栏: 帮助!有什么想法吗? 设备
我是一名优秀的程序员,十分优秀!