How do I make an area unclickable with CSS?

后端 未结 7 1324
轻奢々
轻奢々 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 05:51

    These days you can just position a pseudo-element over the content.

    .blocked
    {
        position:relative;
    }
    .blocked:after
    {
        content: '';
        position: absolute;
        left:0;
        right:0;
        top:0;
        bottom:0;
        z-index:1;
        background: transparent;
    }
    

    http://jsfiddle.net/HE5wR/27/

提交回复
热议问题