Paperfold CSS

Fold divs like paper

Dibuat menggunakan JavaScript, HTML5, CSS3, Mobile,

  • 33295 views
  • 22 comments

More About This Demo From The Author

I'm currently working on 'buddycloud', a federated social network. This is a proposal for a visual folding-effect for hidden comments.

The plugin takes a dom element, slices it into parts and arranges them like a folded paper in 3d space.

22 comments so far

Log in to add your own.

  1. rudolfrck berkata,

    Great demo! Love the concept.
    Only challenge is that you are animating the height property, which gives poor performance on almost any mobile device because of the repaints. If this could somehow be done with translate or anything similar it would greatly increase the performance.
  2. mrflix berkata,

    Rudol, great point.
    While developing I checked it using Safari's awesome hardware-acceleration debugger and wonderd where the repaints come from. Now as you name its obviouse that it's triggered by the height. Changing that to a translation on the y-axis seems not to hard to implement: I can move everything down via translation. It just seems quite complex if there are following posts. Can I move them down using the normal element-flow (e.g. no translation) without redraw?triggers
  3. onkelyoo berkata,

    great job (Echt man krass :D). I just started learning HTML, CSS and JS but this is really nice. RESPECT! Greetings from Hamburg!
  4. mrflix berkata,

    Hey, schön was aus Hamburg zu hören. Da muss ich bald mal hin tuckeln - is ja nich weit von Berlin. Einfach dran bleiben - bin vor drei Jahren auch am Anfang gestanden. Es macht echt Spass, wenn du zu dem Punkt kommst, an dem du einfach alles basteln kannst so wie du es dir vorstellst.
  5. IvanMoreno berkata,

    Nice stuff!
  6. doktor berkata,

    Very sexy - love the effect... but... change height to 344 and click Open - goes into endless loop and never completes task - Chrome, latest cut at the time of writing
  7. mattx berkata,

    awesome!!!!
  8. Subbu berkata,

    Hi,
    Its a great, demo, but i find some problem with it.
    If i adjust "time","3d" everything is fine.
    When the height is adjust (not the default) to 230 or something, the timer bar goes left-right and back
    Is it a bug or something

    -Subbu
  9. apaatsio berkata,

    Very nice. Have you assessed the performance? On a new desktop it seems to work fine but how about mobile devices?

    And I noticed the folding doesn't work with canvas elements. The folded version only shows an empty canvas even if the original canvas had some graphics in it. I believe the cloning of elements loses the canvas data and you need to redraw each canvas clone separately.
  10. mrflix berkata,

    Oh yes, makes sense that the information on canvases gets lost on the way.
    I tested the demo on an iPod touch (4th gen.) and an iPad 2 and it performed well.
    The performance bottleneck lies in the cloning of the elements. I see two solutions for that: 1.) background: element (http://hacks.mozilla.org/2010/08/mozelement/) and 2.) arbitrary folds - fold for each div. Therefore the animation has to be calculated in Javascript - so that's no optimal solution. Though - one might be able to generate a fitting bezier curve for every slide and then animate via css-transitions.
  11. RaineDragon berkata,

    Great idea, love the way it looks, but having it move all around makes it hard to click on the show more comments on the actual page. I use a wacom tablet + Pen set, and my "clicks" are more likely to be interpreted as motion by the computer than a mouses' clicks. So I had to click a good 5-6 times before I stopped slightly wiggling the whole thing and actually opened it. I have to wonder if people with touch-screen devices have the same issue?
  12. bedex78 berkata,

    In Firefox, it doesn't render & perform very well, though.

    Anyway, here's a good implementation: https://vimeo.com/41495357/
  13. bedex78 berkata,

    And here: http://www.honcheng.com/2012/02/Playing-with-folding-navigations
  14. abhixecutor berkata,

    love it :)
  15. devcd berkata,

    Great effect. Is there a way to have the same effect in Internet Explorer 9 using a javascript library like Jquery?
    1. mrflix berkata,

      No, no there is no way :-( It should work in Internet Explorer 10 though.
  16. mplungjan berkata,

    I lose Betty and Gero's pictures on latest Chrome on OSX Mountain Lion after I expand
  17. nicedice berkata,

    Hi, sweet demo - hats off to you sir!
    Is there a way to get the paperfold effect horizontal not vertical? I've had a quick look through your code and can't see any easy way apart from re-writing paperfold.js - this would be a hard task for me as I'm not the best at JS.
    Cheers
  18. tank berkata,

    well done!
  19. dnordstrom berkata,

    Great work, looks fantastic on Aurora (currently Firefox 27.0a2, about to update).
  20. wpgra berkata,

    Nice stuff
  21. FloRida berkata,

    Life's too short. Love, live & regret nothing

About this Demo

Download the Source 124.57 KB · ZIP File

This demo is released under the Public Domain (where applicable by law) license.