Remove 3D push effect on a button

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

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

8条回答
  •  星月不相逢
    2020-12-06 16:38

    It's a browser behaviour, a simple solution is to use a link tag instead of button (since you're calling a javascript function).

    
    

    If you still want to use the , I've found that there are some characteristics on each browser (in a simple debug):

    • Chrome adds outline and padding
    • Firefox adds a whole lot of stuff with the standart button border
    • IE messes with the inner text position

    So to fix them, you have to manipulate the pseudo selectors for the button behaviour. And for IE, a good solution is to envolve your text on a element, and make it relative positioned. Like so:

    
    
    
    

    Pen

    This is a duplicate question

提交回复
热议问题