English 中文(简体)
页: 1 Query plugin to do crazy New York Times-type hover zooming?
原标题:jQuery plugin to do crazy New York Times-style hover zooming?

我不禁要问,是否有任何人知道哪里哪里有一部法典,允许你在 h子上做om子——例如:

http://opinionator.blogs.nytimes.com/2010/12/09/ROMizing-slavery/

亚伯拉罕·林肯读了《解放公告》,该公告是在闪电中建立的,这正是我所要求的。

注: I m not, 要求最终采用“放大玻璃”工具,如任何th牛园(http://csss-tricks.com/examples/AnythingZoomer/); 我希望,循环部分能够取代未分化的形象,保持同样的层面。

我更喜欢这样作,但愿作任何事情。

最佳回答

一、导 言

     $.fn.zoom = function() {
        var w = this.width();
        var h = this.height();

        var zimg = $( <img> , {
             src : this.attr( src )
        }).css({
             position :  absolute ,
             left : 0,
             top : 0,
             opacity : 0
        })

        var moveZone = $( <div> ).css({
             position :  absolute ,
             left : 0,
             top : 0,
             width :  100% ,
             height :  100% 
        }).hover(

        function() {
            zimg.fadeTo(500, 1);
        }, function() {
            zimg.fadeTo(500, 0);
        }).mousemove(

        function(ev) {
            zimg.css({
                 left : (w - zimg.width()) / w * ev.offsetX,
                 top : (h - zimg.height()) / h * ev.offsetY
            });
        });

        this.wrap($( <div> ).css({
             overflow :  hidden ,
             position :  relative ,
             width : w,
             height : h
        })).after(zimg, moveZone)
    }

demo

问题回答

仅发现这一点,稍微接近于我想要做的事情:Min ZoomPan——见:

感谢任何进展, 无





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签