Add onclick with css pseudo-element after

前端 未结 5 1661
别跟我提以往
别跟我提以往 2021-02-06 23:20

Is it possible in my css file to do something like that?:

.myclass:after{
   content:\"click me\";
   onclick:\"my_function()\";
 }

I want to a

5条回答
  •  滥情空心
    2021-02-06 23:42

    If something can be done with jQuery, then it is sure that it is possible to do it without that. Lets see a data model:

    We need some stylesheet:

    
    

    And a code:

    
    

提交回复
热议问题