Can someone explain what the contextmenu attribute in HTML5 does?

前端 未结 6 2021
盖世英雄少女心
盖世英雄少女心 2021-01-12 18:07

can someone explain what the the contextmenu attribute does and if it can be used with all the HTML elements and can someone point me to some online demos/examples?

6条回答
  •  余生分开走
    2021-01-12 18:44

    Quoting for you to understand easily:

    The contextmenu attribute allows you to display a menu without taking up valuable UI space for the menu. It is a menu which fires on events, such as mouseup or keyup providing a bubble menu which provides options and actions based on those selections.

    Source: http://net.tutsplus.com/tutorials/html-css-techniques/html5-globals-and-you/

    See official link for more information:

    http://www.w3.org/TR/html5/interactive-elements.html

提交回复
热议问题