드래그,hover,애니메이션 일반 속성

5828 단어 jquery

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>  ,hover,  title>
    <script type="text/javascript" src="../jquery-3.2.1.min.js">script>

    


    
    <style type="text/css">
    #div1{width: 100px;height: 100px;background: red}
    #div2{width: 100px;height: 100px;background: yellow}
    style>
    <script type="text/javascript">
    $(function(){
        $('#div1').hover(function(){
            //$(this).css('background',"blue");
            //$('#div2').hide(1000);
            //$('#div2').fadeOut(3000);
            //$('#div2').slideUp();
            $('#div2').fadeTo(1000,0.5);
        },function(){
            //$(this).css('background',"red");
            //$('#div2').show(1000);
            //$('#div2').fadeIn(3000);
            //$('#div2').fadeTo(3000);
            //$('#div2').slideDown();
            $('#div2').fadeTo(1000,1);

        });
    });
    script>
head>
<body>
    <div id="div1">div>
    <div id="div2">div>
body>
html>

좋은 웹페이지 즐겨찾기