Disabling browser status bar text

前端 未结 5 1025
执笔经年
执笔经年 2021-02-13 17:50

Background

Modern browsers do away with the classic status bar and instead draw a small tooltip at the bottom of their windows that displays the link target on hover/f

5条回答
  •  不知归路
    2021-02-13 17:58

    
    

    Note that this treats ctrl-clicks as ordinary clicks and disables right-clicking. I don't know about middle clicks.

    You could also use "a" and merely replace the href with the onclick as in the code above, but when I tried that my "a:hover" styling stopped working. Apparently an "a" without an href is considered unhoverable, at least in Firefox. So I switched to "button" and "button:hover" styling and all was well.

    I understand this solution will be considered bad practice, but in some situations, eg the site I'm making made up mainly of full screen photos, aesthetics trumps principles.

提交回复
热议问题