Add onclick with css pseudo-element after

前端 未结 5 1669
别跟我提以往
别跟我提以往 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:47

    No,but you can do like this

    In html file add this section

    In css you can do like this

    .myclass div.arrow{
       content:"click me";
       onclick:"my_function()";
     }
    

    Hope it will help you

提交回复
热议问题