Please help with Image Reflection
-
I got this code from Webdesignerwall for image reflections but I’m not able to implement it all the way with WordPress.
CSS Code
.reflection .image-wrap { -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(0,0,0,.5); -moz-box-shadow: inset 0 0 1px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(0,0,0,.5); box-shadow: inset 0 0 1px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(0,0,0,.5); -webkit-transition: .5s; -moz-transition: .5s; transition: .5s; -webkit-border-radius: 20px; -moz-border-radius: 20px; border-radius: 20px; } .reflection .image-wrap:after { position: absolute; content: ' '; width: 100%; height: 30px; bottom: -31px; left: 0; -webkit-border-top-left-radius: 20px; -webkit-border-top-right-radius: 20px; -moz-border-radius-topleft: 20px; -moz-border-radius-topright: 20px; border-top-left-radius: 20px; border-top-right-radius: 20px; background: -moz-linear-gradient(top, rgba(0,0,0,.3) 0%, rgba(255,255,255,0) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,.3)), color-stop(100%,rgba(255,255,255,0))); background: linear-gradient(top, rgba(0,0,0,.3) 0%,rgba(255,255,255,0) 100%); }
HTML Code
<div class="box reflection"> <span class="image-wrap " style="position:relative; display:inline-block; background:url(https://i47.tinypic.com/2i7y42p.png)"> <img style="opacity: 0;" src="https://i47.tinypic.com/2i7y42p.png" alt="ALT TAG" align="right"></span></div>
And here is the PHP code for the image I’m trying to apply this style to
PHP Code:
`<?php $values = get_post_custom_values(“cf_Thumbnail”);if ( !empty($values) ) {
echo ‘<img class=”myimage” src=”‘ . $values[0].'” alt=”ALT TAG” align=”right” vspace=”15″ hspace=”15″ >’;}else { echo ”;}?>`If anyone knows how to implement all this together, please help. Thanks.
Viewing 15 replies - 1 through 15 (of 15 total)
Viewing 15 replies - 1 through 15 (of 15 total)
- The topic ‘Please help with Image Reflection’ is closed to new replies.