Hide Show content-list with only CSS, no javascript used

前端 未结 12 1588
长发绾君心
长发绾君心 2020-11-28 23:18

I\'ve been searching for a good trick to make a Hide/Show content or a list with only CSS and no javascript. I\'ve managed to make this action:



        
12条回答
  •  鱼传尺愫
    2020-11-28 23:44

    There is 3 rapid examples with pure CSS and without javascript where the content appears "on click", with a "maintained click" and a third "onhover" (all only tested in Chrome). Sorry for the up of this post but this question are the first seo result and maybe my contribution can help beginner like me

    I think (not tested) but the advantage of argument "content" that you can add great icon like from Font Awesome (its \f-Code) or an hexadecimal icon in place of the text "Hide" and "Show" to internationalize the trick.

    example link http://jsfiddle.net/MonkeyTime/h3E9p/2/

    
       
    
    
    
    Lorem iupsum dolor si amet
    
    
    
    
    
    Ipsum Lorem
    Lorem Ipsum

提交回复
热议问题