How do I make an area unclickable with CSS?

后端 未结 7 1322
轻奢々
轻奢々 2020-12-01 05:10

Let\'s say if I have wrapper div which includes some links and images, is there any way I can deactivate it at once with CSS only?


After review of answers:

7条回答
  •  误落风尘
    2020-12-01 06:02

    You should consider to apply the event.preventDefault function of jQuery. Here you can find an example:

    http://api.jquery.com/event.preventDefault/

    TL;DR-version:

    $("#element-to-block").click( function(event) {
      event.preventDefault();
    }
    

    BAM!

提交回复
热议问题