今天我们就用hover伪类加上css3实现,没有使用任何JS
#d1{ height: 100px; position: relative; width: 100px; overflow: hidden; } #d1:hover > #d3{ transition: transform 0.5s ease; transform: translateY(-100%); } #d2{ background: red; height: 100px; width: 100px; } #d3{ color: white; background: #111; height: 100px; opacity: 0.6; width: 100px; }
查看更多关于通过CSS3,实现元素覆盖效果_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did108269