JS鼠标提示框效果

 1 DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>Documenttitle>
 6     <style type="text/css">
 7         #div1{
 8             width: 200px;
 9             height: 50px;
10             background-color: orange;
11             display: none;
12         }
13     style>
14 head>
15 <body>
16     <input type="checkbox" onmouseover="document.getElementById(‘div1’).style.display='block'" onmouseout="document.getElementById(‘div1’).style.display='none'">
17     <div id="div1">你好,这是鼠标移入移出效果div>
18 body>
19 html>

 

你可能感兴趣的:(JS鼠标提示框效果)