最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to show image at half or crop it's own size? - Stack Overflow

programmeradmin0浏览0评论

I have tried with many times but didnt happen ..

on img src i want to show only half image and when i will mouseover on that image it will show me the full image ... is it possible

I have tried with many times but didnt happen ..

on img src i want to show only half image and when i will mouseover on that image it will show me the full image ... is it possible

Share Improve this question asked Mar 3, 2012 at 12:01 Rishi JogleRishi Jogle 2874 gold badges6 silver badges10 bronze badges 0
Add a comment  | 

3 Answers 3

Reset to default 10

There is a property called clip

Check out this fiddle

Yes. You could use a div with overflow:hidden; around the image. Change the size of the div instead the size of the image.

Example with jQuery: http://jsfiddle.net/5GWCz/

Or CSS-Only: http://jsfiddle.net/5GWCz/2/

you can use CSS Image Sprites for doing this look in this link

http://www.w3schools.com/css/css_image_sprites.asp

发布评论

评论列表(0)

  1. 暂无评论