So I have a background image(background:url(my_image.jpg) no-repeat;
), and I need a r开发者_JAVA技巧eflection for that picture, you can see here, what I mean: http://www.imgmodels.com/.
Is there a way to do that, using a JS script or css hacks...?
Best Regards,
Here is a jquery plugin that does it: http://www.digitalia.be/software/reflectionjs-for-jquery
I don't know any css method (only if you crop the image and create a new div below the image, and add a background with css) but you can use jquery reflection.
You can achieve that using HTML5 canvas and for IE DirectX filters will help you to achieve the same effect. There is also a pre-made library that solves that for you: http://cow.neondragon.net/stuff/reflection/
You can do it with pure css, but unfortunately only properly in Webkit browsers.
See here
精彩评论