Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Giving images 3D depth/dimension

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #199915
    modiophile
    Participant

    I am trying to give an image I have some depth and dimension via img { box-shadow: 5px 5px 0px 0px #ccc; }

    The problem is that it simply looks like a flat plane with a shadow instead of a 10px thick block. Is there an easy way so that the corners don’t appear to have a gap and are closed, like a single block. Thanks!

    http://codepen.io/modiophile/pen/PwvaOZ

    #199919
    Paulie_D
    Member

    You’d have to use multiple box-shadows in 1px increments.

    I’ve used 2px here but you get the idea.

    http://codepen.io/Paulie-D/pen/yyWEjp

    #199920
    Shikkediel
    Participant

    Answer revoked – Paulie’s is much better.

    #199921
    Paulie_D
    Member

    Means you can make them appear like stacks of images too..that also respect border-radius!

    http://codepen.io/Paulie-D/pen/YPbvjz

    #199927
    modiophile
    Participant

    Thanks Paulie_D, easy solution. I thought I would have to be dealing with :after, :before pseudo classes and border-widths, phew.

    #200059
    modiophile
    Participant

    The thread is solved, but I wanted to see if I can take it a step further.. I know I’ve seen this functionality before where you hover over an object and it very subtlety moves depending on your cursor movement. If anybody can point me to this effect, I’d appreciate it. Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.