zoukankan      html  css  js  c++  java
  • mouseenter 和 mouseover的区别

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
        <style>
            .father {
                 300px;
                height: 300px;
                background-color: pink;
                margin: 100px auto;
            }
            
            .son {
                 200px;
                height: 200px;
                background-color: purple;
            }
        </style>
    </head>
    
    <body>
        <div class="father">
            <div class="son"></div>
        </div>
        <script>
            var father = document.querySelector('.father');
            var son = document.querySelector('.son');
            father.addEventListener('mouseenter', function() {
                console.log(11);
    
            })
        </script>
    </body>
    
    </html>
  • 相关阅读:
    String和StringBuilder和StringBuffer
    多态
    组件
    反向代理
    基础知识
    reflection
    v-model 与 v-bind:model
    tomcat端口占用问题
    socket
    简要概括内存机制
  • 原文地址:https://www.cnblogs.com/fuyunlin/p/14460753.html
Copyright © 2011-2022 走看看