Paperfold CSS

Fold divs like paper

建立方法 JavaScript, HTML5, CSS3, Mobile,

  • 24209 個檢視數
  • 22 條回應

作者所寫的更多關於此 Demo 的資訊

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 條回應

Log in to add your own.

  1. rudolfrck 說,

    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 說,

    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 說,

    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 說,

    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 說,

    Nice stuff!
  6. doktor 說,

    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 說,

    awesome!!!!
  8. Subbu 說,

    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 說,

    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 說,

    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 說,

    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 說,

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

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

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

    love it :)
  15. devcd 說,

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

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

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

    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 說,

    well done!
  19. dnordstrom 說,

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

    Nice stuff
  21. FloRida 說,

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

About this Demo

下載原始碼 124.57 KB · ZIP 格式

此 demo 係以 Public Domain (where applicable by law) 條款進行授權。