Remove 3D push effect on a button

前端 未结 8 1557
忘掉有多难
忘掉有多难 2020-12-06 16:27

I\'m trying to remove all effects on a HTML Button element. The HTML:

相关标签:
8条回答
  • 2020-12-06 17:04

    The following helped for me in IE 10:

    button:active {
      position: relative;
      top: -1px;
      left: -1px;
    }
    

    It fixed the top perfectly, but left still had background bleed-though for my case. Still looks a bit odd if the user starts clicking and then moves the mouse off the button. Also obviously only enable the rule for relevant IE version(s).

    0 讨论(0)
  • 2020-12-06 17:05

    Position relative seemed to have taken care of the problem

    Simply have a wrapper within the button:

    So

    <button>
       <div class="content">Click Me</div>
    </button>
    

    and set the DIV to position relative with top: 0, left: 0

    Example below:

    http://jsfiddle.net/eyeamaman/MkZz3/

    0 讨论(0)
提交回复
热议问题