元素2
赞
踩
<ol>
<li>元素1</li>
<li style=" visibility:hidden">元素2</li>
<li>元素3</li>
</ol>
// 1.元素1
//
// 3.元素3
<div class="parent"> <div class="child"></div> </div> <style> .parent{ width: 100px; height: 100px; background-color: sandybrown; /* display: none; */ visibility: hidden; transition: all 1s; } .parent:hover { /* display: block; */ visibility: visible; } .child { width: 50px; height: 50px; background-color: red; /* display: block; */ /* visibility: visible; */ opacity: 1; } </style>
<div class="parent"> <div class="child"></div> </div> <style> .parent{ width: 100px; height: 100px; background-color: sandybrown; opacity: 0; transition: all 1s; } .parent:hover { opacity: 1; } .child { width: 50px; height: 50px; background-color: red; /* display: block; */ /* visibility: visible; */ opacity: 1; } </style>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。