当用户点击按钮时,你能告诉我如何从Bootstrap 3按钮中删除渐变:如下图所示:
.btn { display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px; } .btn:focus,.btn:active:focus,.btn.active:focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .btn:hover,.btn:focus { color: #333; text-decoration: none; } .btn:active,.btn.active { background-image: none; outline: 0; -webkit-Box-shadow: inset 0 3px 5px rgba(0,.125); Box-shadow: inset 0 3px 5px rgba(0,.125); }
解决方法
在按钮的活动状态期间应用框阴影.
试试这个:
.btn:active { Box-shadow:none; }