new*_*101 1 html css twitter-bootstrap
我试图给<select>菜单自定义颜色和填充。截至目前,它看起来像这样:
select {
display: block;
margin: 0 auto;
background-color: #2A3F54;
}Run Code Online (Sandbox Code Playgroud)
<select name="ad_account_selected" onchange="this.form.submit()" class="selectpicker" data-style="btn-primary">
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
</select>Run Code Online (Sandbox Code Playgroud)
我想在菜单和左侧之间留一个小缝隙,并为其添加边栏的颜色(在上面的菜单周围可见)。但是,即使我添加padding-left: 20px了菜单,该按钮仍保持默认颜色,但菜单仍停留在左侧。有什么帮助吗?
更改data-style为btn-new这样:
<select data-style="btn-new">
....
</select>
Run Code Online (Sandbox Code Playgroud)
然后按如下所示设置该按钮的样式:
.btn-new {
background-color: #2A3F54;
}
Run Code Online (Sandbox Code Playgroud)
链接到CodePen:http://codepen.io/anon/pen/pyBjrr