我正在使用bootstrap 3.3.6。 btn-group-justified类适用于链接标记,但不能像我期望的输入标记那样工作。在这种情况下,如何正确应用btn-group-justified类?
见下面的例子:
<form>
<div class="btn-group btn-group-justified" id="aaa">
<a class="btn btn-success" role="">Submit</a>
</div>
<div class="btn-group btn-group-justified" id="bbb">
<input type="submit" class="btn btn-success" value="Submit">
</div>
</form>
答案 0 :(得分:0)
input[type="submit"]
{
width:100%!important;
}
&#13;
<head>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<form>
<div class="btn-group btn-group-justified" id="aaa">
<a class="btn btn-success" role="">Submit</a>
</div>
<div class="btn-group btn-group-justified" id="bbb">
<input type="submit" class="btn btn-success" id="submit" value="Submit">
</div>
</form>
</body>
&#13;
答案 1 :(得分:0)
你可以添加style =&#34; width:100%!important&#34;在你的输入