十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
Bootstrap 4 中允许我们将按钮放在同一行上。

让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:域名注册、雅安服务器托管、营销软件、网站建设、陇南网站维护、网站推广。
可以在
<
div
 
class
=
"
btn-group
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Apple
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Samsung
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Sony
button
>
 
div
>
尝试一下 » 
提示: 我们可以使用 .btn-group-lg|sm 类来设置按钮组的大小。
<
div
 
class
=
"
btn-group btn-group-lg
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Apple
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Samsung
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Sony
button
>
 
div
>
尝试一下 » 
可以使用 .btn-group-vertical 类来创建垂直的按钮组:
<
div
 
class
=
"
btn-group-vertical
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Apple
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Samsung
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Sony
button
>
 
div
>
尝试一下 » 
我们可以在按钮组内设置下拉菜单:
<
div
 
class
=
"
btn-group
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Apple
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Samsung
button
>
 
<
div
 
class
=
"
btn-group
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary dropdown-toggle
"
 
data-toggle
=
"
dropdown
"
>
 Sony 
button
>
 
<
div
 
class
=
"
dropdown-menu
"
>
 
<
a
 
class
=
"
dropdown-item
"
 
href
=
"
#
"
>
Tablet
a
>
 
<
a
 
class
=
"
dropdown-item
"
 
href
=
"
#
"
>
Smartphone
a
>
 
div
>
 
div
>
 
div
>
尝试一下 » 
<
div
 
class
=
"
btn-group
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Sony
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary dropdown-toggle dropdown-toggle-split
"
 
data-toggle
=
"
dropdown
"
>
 
<
span
 
class
=
"
caret
"
>
span
>
 
button
>
 
<
div
 
class
=
"
dropdown-menu
"
>
 
<
a
 
class
=
"
dropdown-item
"
 
href
=
"
#
"
>
Tablet
a
>
 
<
a
 
class
=
"
dropdown-item
"
 
href
=
"
#
"
>
Smartphone
a
>
 
div
>
 
div
>
尝试一下 » 
<
div
 
class
=
"
btn-group-vertical
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Apple
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Samsung
button
>
 
<
div
 
class
=
"
btn-group
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary dropdown-toggle
"
 
data-toggle
=
"
dropdown
"
>
 Sony 
button
>
 
<
div
 
class
=
"
dropdown-menu
"
>
 
<
a
 
class
=
"
dropdown-item
"
 
href
=
"
#
"
>
Tablet
a
>
 
<
a
 
class
=
"
dropdown-item
"
 
href
=
"
#
"
>
Smartphone
a
>
 
div
>
 
div
>
 
div
>
尝试一下 » 
按钮组可以一个个并列显示在同一行上:
<
div
 
class
=
"
btn-group
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Apple
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Samsung
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Sony
button
>
 
div
>
 
<
div
 
class
=
"
btn-group
"
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
BMW
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Mercedes
button
>
 
<
button
 
type
=
"
button
"
 
class
=
"
btn btn-primary
"
>
Volvo
button
>
 
div
>
尝试一下 »