CSS page curls

Shot_1291908089

30 Responses (page 1 of 2)

  1. Pro Cameron Moll Cameron Moll

    The only images above are the logos. The rest is CSS using box-shadows, transforms, and generated content.

    Stumbled on the demo code by Matt Hamm yesterday, already playing with it in a project.

    likes

    over 2 years ago

  2. over 2 years ago

  3. Pro Jory Raphael Jory Raphael

    Very nice.

    over 2 years ago

  4. Pro Rogie Rogie

    Rad!

    over 2 years ago

  5. Pro Trent Walton Trent Walton

    I love to see stuff like this. And kudos to Matt for sharing!

    likes

    over 2 years ago

  6. Chris Cashdollar Chris Cashdollar

    Really nice.

    (Hmmm... how quickly can I work these into a new project?)

    over 2 years ago

  7. Pro Chris Wallace! Chris Wallace!

    I prefer your implementation to Matt's, looks more realistic. His shadows sort of flare out to the corners, yours stay within the bounds of the box horizontally.

    over 2 years ago

  8. Gabe Morton-Cook Gabe Morton-Cook

    Brilliant.

    over 2 years ago

  9. Ryan Essmaker Ryan Essmaker

    Sweet! Totally have to try this out...

    likes

    over 2 years ago

  10. Pro Rogie Rogie

    Agreed with Wallace. His are a great attempt, but lack in realism, whereas yours look legit.

    over 2 years ago

  11. Jason Robb Jason Robb

    Very neat! Thanks for sharing, looks great...

    Although I hate to be so cynical, I have to say it: the shadow isn't really curling the box, it's showing that the background is warped. =)

    If there was only a way to trim a pixel or two off of the boxes edges near the corners. CSS layer masks sure would be nice. Sigh.

    likes

    over 2 years ago

  12. Pro Dave Ruiz Dave Ruiz

    Looks even better than the original, which was already great. Are you planning on posting the code?

    over 2 years ago

  13. Michel Bozgounov Michel Bozgounov

    Mmmh, not bad!

    Hopefully IEX will be on par with today's browsers CSS3 capabilities, so we'll be finally able to see this awesomeness everywhere! ;)

    over 2 years ago

  14. Michel Bozgounov Michel Bozgounov

    PS I mean IE v.10, of course... whenever it is released... :-P

    over 2 years ago

  15. Pro Matt Hamm Matt Hamm

    Hello Cameron. Thanks for taking this forward. This looks really, really lovely. I particularly love the inset shadow on the boxes too. Please share the new code once finished! :)

    @Chris I totally agree with you too. Mine do look a little too flared.

    I also had a problem using z-index on the :before :after. For example when you want to give the containing a background color. The shadows would sit behind the and become invisible, would be great to see a solution to this problem in particular.

    over 2 years ago

  16. jonathan youngblood jonathan youngblood

    hot

    over 2 years ago

  17. Pro Andy Johnson Andy Johnson

    The subtle inset shadow on the boxes are a nice touch.

    over 2 years ago

  18. Pro Gerren Lamson Gerren Lamson

    awesome.

    over 2 years ago

  19. Pro Cameron Moll Cameron Moll

    Good clarification, Jason.

    likes

    over 2 years ago

  20. Pro Cameron Moll Cameron Moll

    Hope you'll all forgive me for abusing the comment space, but here's the modified code by request. Took out the moz and IE browser prefixes while I was testing. (You can find the syntax for those in Matt's original code.)

    ul.box li {
    list-style-type: none;
    margin: 0 30px 30px 0;
    padding: 0;
    width: 204px;
    height: 113px;
    position: relative;
    float: left;
    background: #ffffff; /* old browsers */
    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
    }

    ul.box li:after {
    z-index: -1;
    position: absolute;
    background: transparent;
    width: 70%;
    height: 55%;
    content: '';
    right: 10px;
    bottom: 10px;
    -webkit-transform: skew(15deg) rotate(6deg);
    -webkit-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    ul.box li:before {
    z-index: -2;
    position: absolute;
    background: transparent;
    width: 70%;
    height: 55%;
    content: '';
    left: 10px;
    bottom: 10px;
    -webkit-transform: skew(-15deg) rotate(-6deg);
    -webkit-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    likes

    over 2 years ago

  21. Pro Chris Wallace! Chris Wallace!

    @Jason Robb I wish this were closer to being implemented in all major browsers: http://webkit.org/blog/181/css-masks/

    over 2 years ago

  22. Ben Bodien Ben Bodien

    Don't forget to add the non vendor prefixed properties for box-shadow and transform as well for future proofing! (I'm guessing you've missed -moz- out in your paste because you copied from Safari).

    over 2 years ago

  23. Pro Cameron Moll Cameron Moll

    Correct. Left out anything not specific to Safari for now, as I was (and still am) testing in Safari.

    over 2 years ago

  24. Jason Robb Jason Robb

    @Chris Wallace: Ditto! You just made me squeal with joy.

    over 2 years ago

  25. Pro Allison Grayce Allison Grayce

    Very cool, Cameron! Thanks so much for sharing!

    over 2 years ago

keyboard shortcuts: previous shot next shot L or F like