English 中文(简体)
Apple类肥料
原标题:Apple like mouse hover-zoom cursor
  • 时间:2010-07-07 18:14:01
  •  标签:
  • jquery
  • html
问题回答

• 在酒吧为 mo和 mo().)举办活动。

在 mo园,当 mo( mo)火灾时,显示动物群落并隐藏着。 你们应该利用两个邦的社会保障局课程。 应将“zoom icon”置于绝对的位置,其定位集装箱应当是网页的体。

接着,在图像上开展运动活动。 在这项职能中,确定了动物群的绝对地位,因此,它从目前的土地使用状况来看,总是没有什么变化。

www.un.org/Depts/DGACM/index_spanish.htm 抽样活动 Bleds

$( .someImage ).bind( mouseenter , function () {

    $( #zoomIcon ).addClass( over );

}).bind( mouseleave , function () {

    $( #zoomIcon ).removeClass( over );

}).bind( mousemove , function (e) {

    $( #zoomIcon ).css( top , e.clientY-40).css( left , e.clientX);

});

这让你们看到了“血清”行为。 点击事件行为不过是两条。 下面的法典显示了一种使用新准则的手制动物特征。 该守则是为网站设计的,但你可以很容易地补充其他浏览器特定规则,以获得良好的交叉浏览器支持。

“动物群”特征检查了烟火点的位置,并将该位置转换成四颗 qua之一。 如果你想要的话,你可以把形象分成更多的人。 之后,一旦知道这名大人物,你就会确定绝对立场,改变形象的高度/宽度。 cs3 过渡性财产减慢了高/宽度变化,使你获得冰层动物特征。

www.un.org/Depts/DGACM/index_spanish.htm Sample Zom Behavior

<!DOCTYPE html> 
<html lang="en"> 
<head>
    <title>sample zoom</title>
    <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script>

    <style> 
        #zoomContainer,
        #zoomContainer img {
            height:300px;
            width:400px;
        }
        #zoomContainer img {
            -transition-property: height,width;
            -webkit-transition-duration: 3s;
            position:absolute;
        }
        #zoomContainer {
            background:#F00;
            overflow:hidden;
            position:relative;
            border:1px solid #000;
        }
        #zoomContainer.over {
            cursor:pointer;
        }
        #zoomContainer img.zoom {
            width:962px;
            height:517px;
        }
    </style> 

    <script type="text/javascript"> 

        /* my custom jQuery extension */

        (function ($) {

            $.fn.setPositionByQuadrant = function (quadrant) {

                switch (quadrant) {

                    case 1:
                    this.removeAttr( style ).css( top , 0).css( left , 0);
                    break;

                    case 2:
                    this.removeAttr( style ).css( top , 0).css( right , 0);
                    break;

                    case 3:
                    this.removeAttr( style ).css( bottom , 0).css( left , 0);
                    break;

                    case 4:
                    this.removeAttr( style ).css( bottom , 0).css( right , 0);
                    break;
                }

                return this;
            };

        })(jQuery);

        /* page specific javascript */

        $(function () {

            $( #zoomContainer ).mouseenter(function () {
                $(this).addClass( over );
            }).mouseleave(function () {
                $(this).removeClass( over );
            }).mousemove(function () {
                // change position of zoom icon here
            }).click(function (e) {
                var quadrant = convertClickPositionToQuadrant(e, $(this));
                var img = $(this).find( img ).toggleClass( zoom ).setPositionByQuadrant(quadrant);
            });

        });

        /* conversion function */

        function convertClickPositionToQuadrant(e,target) {

            var x = e.offsetX;
            var y = e.offsetY;

            var xMiddle = target.width() / 2;
            var yMiddle = target.height() / 2;

            if (x > xMiddle) {
                if (y > yMiddle)
                    return 4;
                else
                    return 2;

            } else {
                if (y > yMiddle)
                    return 3;
                else
                    return 1;
            }
        }

    </script> 

</head> 

<body> 

    <h2>Sample Zoom</h2>

    <div id="zoomContainer">
        <img src="http://dots.physics.orst.edu/graphics/image_maps/usa_map.gif" alt="" /> 
    </div> 

</body>
</html>




相关问题
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!

热门标签