CSS: Is a hidden object clickable?

后端 未结 4 614
醉梦人生
醉梦人生 2020-12-05 03:35

If the visibility property of the style of an HTML element is set to hidden, is it still clickable?

When the display property

4条回答
  •  情深已故
    2020-12-05 04:20

    You can use useRef in react, add ref to your input and use it to call onClick like below

      import React, { useRef } from "react";
      const input = useRef();
      
    

    and then call whatever you want like click method

     input.current.click();
    

提交回复
热议问题