Basically I'm trying to create a reflection of an image using CSS as shown below (and/or jQuery, but not something that will really affect performance). This will need to work responsively too.
The idea is there will be an iMac PNG (with a hole cut out for the site screenshots), and then using a Content Management System I would upload the site screenshot and it would be placed in and behind the screen to show through .... this all works fine, but I then want the screen and site screenshot to be reflected below. I know it's only subtle, but if it's possible I would like to do it.
This is the code structure I'm planning to use, feel free to use this in any examples :)
DEMO: http://codepen.io/anon/pen/gKnry
<div class="screen_contain">
<img src="imac-image.png" class="imac">
<img src="website_image.png" class="website">
</div>
.screen_contain {
display:inline-block;
position: relative;
width:33%;
}
.imac {
width: 100%;
position: relative;
z-index: 10;
}
.website {
position: absolute;
left: 5.0%;
top: 5%;
width: 90%;
z-index: 5;
}
Notes:
- I would obviously be able to merge the iMac image so that it has the main iMac AND it's reflection in one image ... save on requests and messy code.
- This is going to be populated by a client so all they will be able to do is upload the screenshot of a website.
Thanks!