zoukankan      html  css  js  c++  java
  • jquery 学习(七)

    <!--转载于 听说你的代码很6-->
    <!--http://www.jq22.com/webqd2377-->

    CSS

        <style>
            #content #first {
                color:white;
                background-color:green;
                width:240px;
                height:100px;
                margin:10px 0 0 0;
                padding:10px;
            }
        </style>

    html

        <div id="content">
        <input id="testhide" type="button" value="隐藏">
        <input id="testshow" type="button" value="显示">
        <input id="testtoggle" type="button" value="隐藏/显示">
        <input id="testslideup" type="button" value="上滑隐藏">
        <input id="testslidedown" type="button" value="下滑显示">
        <input id="testslidetoggle" type="button" value="上/下滑显示">
        <input id="testfadein" type="button" value="淡入显示">
        <input id="testfadeout" type="button" value="淡出显示">
        <input id="testfadetoggle" type="button" value="淡入/出显示">
        <input id="testanimate" type="button" value="自定义显示">
        <div id="first">
            想要做一件事,永远都不要怕晚。只要你开始做了,就不晚。而若是你不开始,仅仅停留在思考、犹豫甚至焦虑的状态,那就永远都是零。
        </div>

    jquery

        <script src="jquery-3.3.1.js"></script>
            <script>
                $(document).ready(function() {
            $("#testhide").click(function() {
                // 动画效果
                $("#first").hide("slow");
            });
            $("#testshow").click(function() {
                // 动画效果
                $("#first").show("slow");
            });
            $("#testtoggle").click(function() {
                // 动画效果
                $("#first").toggle("slow");
            });
            $("#testslideup").click(function() {
                // 动画效果
                $("#first").slideUp("slow");
            });
            $("#testslidedown").click(function() {
                // 动画效果
                $("#first").slideDown("slow");
            });
            $("#testslidetoggle").click(function() {
                // 动画效果
                $("#first").slideToggle("slow");
            });
            $("#testfadein").click(function() {
                // 动画效果
                $("#first").fadeIn("slow");
            });
            $("#testfadeout").click(function() {
                // 动画效果
                $("#first").fadeOut("slow");
            });
            $("#testfadetoggle").click(function() {
                // 动画效果
                $("#first").fadeToggle("slow");
            });
            $("#testanimate").click(function() {
                // 动画效果
                $("#first").animate({
                    fontSize: "12px"
                }, "slow");
            });
        });
            </script>
  • 相关阅读:
    SUSE 安装 iServer、iDesktop启动异常问题
    各系统勒索补丁下载地址
    centos 安装atom 笔记
    转载---SuperMap GIS 9D SP1学习视频播单
    SuSE的命令安装软件 zypper
    Leaflet客户端学习笔记
    设置UI控件的Layer属性(边框可见,边框颜色,边框宽度,边框圆角)
    安全清理Xcode 缓存垃圾
    OC变量命名禁忌
    iOS中的应用启动原理
  • 原文地址:https://www.cnblogs.com/Anec/p/9871331.html
Copyright © 2011-2022 走看看