博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
停止字jQuery中图片隐藏效果的的所有方法
阅读量:7025 次
发布时间:2019-06-28

本文共 2272 字,大约阅读时间需要 7 分钟。

废话就不多说了,开始。。。

    <head>

    <title></title>

    <style type="text/css">

        .imgclass

        {            

            width: 300px;

            height: 300px;

            border: solid 1px red;

            position:relative; left:100px; top:100px;

        }

        img

        {

            position:absolute;

            top:10px;

            left:10px;

            height:100px;

            width:100px;

            }

        td

        {

            width:300px;

            height:300px;

            }

    </style>

    <script src="jquery-1.9.1.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(function () {

            $('img').click(function () {

                //$('img').css({width:'500px',height:'500px'});

                //$('img').animate({width:'500px',height:'500px'}, 2000);

                $(this).animate({ width: '500px' }, 2000).animate({ height: '500px' }, 2000).animate({ left: '+=100px' }, 2000).animate({ top: '-=100px' }, 2000);

            })

            $('#Button1').click(function () {

                $('#spinfo').animate({ fontSize: '40px' }, 2000);

            })

            $('#Button2').click(function () {

                $('img').stop();

            })

            $('#Button3').click(function () {

                $('img').delay(2000).hide(2000);

            })

            $('#Button4').bind('click', function () {

                $('img').fadeIn(2000, function () {

                    $('#Button4').val("哈哈");

                })

            })

            $('#Button5').click(function () {

                $('img').fadeOut(2000, function () {

                    $('#Button5').val("嗯嗯");

    每日一道理
一个安静的夜晚,我独自一人,有些空虚,有些凄凉。坐在星空下,抬头仰望美丽天空,感觉真实却由虚幻,闪闪烁烁,似乎看来还有些跳动。美的一切总在瞬间,如同“海市蜃楼”般,也只是刹那间的一闪而过,当天空变得明亮,而这星星也早已一同退去……

                })

            })

            $('#Button6').click(function () {

                $('img').fadeTo(2000, 0.5, function () {

                    $('#Button6').val("呵呵");

                })

            })

            $('#Button7').click(function () {

                $('img').slideUp(2000);

            })

            $('#Button8').click(function () {

                $('img').slideDown(2000);

            })

            $('#Button9').click(function () {

                $('img').slideToggle(2000)

            })

        })

    </script>

    </head>

    <body>

    <input id="Button1" type="button" value="字变大" />

    <input id="Button2" type="button" value="停止" />

    <input id="Button3" type="button" value="延迟" />

    <input id="Button4" type="button" value="fadeIn" />

    <input id="Button5" type="button" value="fadeOut" />

    <input id="Button6" type="button" value="fadeTo" />

    <input id="Button7" type="button" value="上拉" />

    <input id="Button8" type="button" value="下拉" />

    <input id="Button9" type="button" value="自动上拉下拉" />

    <span id="spinfo">好热</span>

    <br />

    <img src="images/1.jpg" class="imgclass" />

    </body>

文章结束给大家分享下程序员的一些笑话语录: IBM和波音777

  波音777是有史以来第一架完全在电脑虚拟现实中设计制造的飞机,所用的设备完全由IBM公司所提供。试飞前,波音公司的总裁非常热情的邀请IBM的技术主管去参加试飞,可那位主管却说道:“啊,非常荣幸,可惜那天是我妻子的生日,So..”..
  波音公司的总载一听就生气了:“胆小鬼,我还没告诉你试飞的日期呢!”

转载地址:http://bjsxl.baihongyu.com/

你可能感兴趣的文章
CSS实现透明边框
查看>>
Linux中Firefox——Firebug插件安装及使用
查看>>
[leetcode]Valid Sudoku
查看>>
android小说阅读、MVP + RxJava + Retrofit项目、证件拍照裁剪、蓝牙锁等源码
查看>>
webpack-dev-server的刷新模式inline和iframe详解
查看>>
滴滴开源基于 RocketMQ 的分布式消息队列 DDMQ
查看>>
云服务器ecs企业版快速入门概述
查看>>
洛谷 P1854 花店橱窗布置
查看>>
晓羊教育获新东方、华创资本领投近1.5亿元人民币B轮融资 打造基础教育信息化大数据新生态 ...
查看>>
史上最详细阿里云服务器搭建及域名申请攻略
查看>>
阿里云表格存储TableStore全新升级 打造统一在线数据存储平台 ...
查看>>
「镁客·请讲」中芯芯片陈智维:国内芯片没有创新可言,但大家做的是从无到有 ...
查看>>
【直播预告】阿里技术专家天樵:基于JVM的脚本语言开发、运用实践
查看>>
第二十章:异步和文件I/O.(十八)
查看>>
win10应用程序添加到开机启动项的两种解决办法
查看>>
一招教你无阻塞读写Golang channel
查看>>
阿里有群姑娘,是马老师的师兄,还是逍遥子的学长……
查看>>
Docker 在 Coding WebIDE 项目中的运用
查看>>
ATtiny85 制作迷你小游戏机
查看>>
jQuery限制“Text-Area”域中的字符的个数
查看>>