admin管理员组文章数量:1415460
I am using bootstrap-switch - v3.3.1, but I don't need the defaulted blue outline of the switcher when swithing, I set style="outline: 0 none;
for the input but it does not work.
Here is my html:
<div class="switch" style="display:inline-block;>
<input id="accu-switcher" type="checkbox" style="outline: 0 none;" checked data-label-text="TEXT"/>
</div>
JS:
$('#accu-switcher').bootstrapSwitch({size: "mini",state: false});
$('.module .switch').css("visibility","visible");
I am using bootstrap-switch - v3.3.1, but I don't need the defaulted blue outline of the switcher when swithing, I set style="outline: 0 none;
for the input but it does not work.
Here is my html:
<div class="switch" style="display:inline-block;>
<input id="accu-switcher" type="checkbox" style="outline: 0 none;" checked data-label-text="TEXT"/>
</div>
JS:
$('#accu-switcher').bootstrapSwitch({size: "mini",state: false});
$('.module .switch').css("visibility","visible");
Share
Improve this question
asked Apr 21, 2015 at 2:31
JaskeyLamJaskeyLam
15.8k23 gold badges128 silver badges158 bronze badges
3 Answers
Reset to default 6Update this css class or override it to:
.bootstrap-switch.bootstrap-switch-focused
{
outline: none;
box-shadow: none;
}
css:
.bootstrap-switch:focus {
outline: none;
}
Bootstrap switch has the following css which is responsible for the glow and outline: none;
alone will not remove it . (Bootstrap switch css file)
.bootstrap-switch.bootstrap-switch-focused {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
Something like this should do it
.bootstrap-switch{
border-color: #66afe9; /*you can change this depending on your application's background color */
outline: 0 !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
Here is a DEMO
本文标签: javascriptBootstrap Switchhow to remove the outline of the switcherStack Overflow
版权声明:本文标题:javascript - Bootstrap Switch, how to remove the outline of the switcher - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745183993a2646596.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论