开发者

Background image reflection

开发者 https://www.devze.com 2023-01-12 19:55 出处:网络
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/.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消