标签:color html utf-8 class set idt tle 属性 元素
代码如下:
1 <!DOCTYPE html> 2 <html> 3 <head lang="en"> 4 <meta charset="UTF-8"> 5 <title></title> 6 <style type="text/css"> 7 .two{ 8 background-color: aqua; 9 width: 500px; 10 height: 200px; 11 } 12 /*默认的threediv是隐藏的*/ 13 .three{ 14 background-color: black; 15 width: 100px; 16 height: 300px; 17 float: right; 18 visibility:hidden; 19 } 20 /*鼠标移动到twodiv就会改变threediv的visibility*/ 21 .two:hover>.three{ 22 visibility:visible; 23 } 24 </style> 25 </head> 26 <body> 27 <!---鼠标移到到的div----> 28 <div class="two"> 29 <!---默认隐藏的div----> 30 <div class="three"> 31 </div> 32 </div> 33 </body> 34 </html>
dispaly和visibility的区别
标签:color html utf-8 class set idt tle 属性 元素
原文地址:http://www.cnblogs.com/c123/p/7076536.html