【问题标题】:Remove glow from button从按钮上移除发光
【发布时间】:2020-10-21 21:44:32
【问题描述】:

如何消除按钮周围的光晕?我这里好像找不到。该代码已从其他资源中复制。谢谢。

<div class="row clearfix">
   <div id='media-controls' style="width:100%; height:60px; text-align:center;">
   <button id='play-pause-button' title='play' onclick='togglePlayPause();'>Play</button>
    </div>
</div>

我的 CSS:

button {
    width:100px;
    height:50px;
    border:0px;
    cursor:pointer;
}

.pause { background-position:-19px 0; }
.stop { background-position:-38px 0; }
.volume-plus { background-position:-57px 0; }
.volume-minus { background-position:-76px 0; }
.mute { background-position:-95px 0; }
.unmute { background-position:-114px 0; }
.replay { background-position:-133px 0; }

http://jsfiddle.net/XEWhk/413/

【问题讨论】:

  • 我在 jsfiddle 中没有看到发光。是什么样的光芒?
  • 你在说什么发光?我在 jsfiddle 的按钮中找不到任何发光,你能提供截图吗?你是否尝试将
  • @josh 好吧,点击按钮后,会出现灰色阴影

标签: html css responsive-design


【解决方案1】:

您必须将其添加到按钮:

outline: 0;

Fiddle

【讨论】:

    【解决方案2】:

    为了消除按钮周围的发光,您可以使用以下 css:

    box-shadow:none;
    

    【讨论】:

    • 你可以看到它不是盒子阴影或其他任何东西。它是一些浏览器默认做的焦点大纲。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-11
    相关资源
    最近更新 更多