|
@@ -0,0 +1,37 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>Document</title>
|
|
|
+ <style>
|
|
|
+ .box{
|
|
|
+ width: 400px;
|
|
|
+ height: 400px;
|
|
|
+ border:3px solid black;
|
|
|
+ }
|
|
|
+ .box:hover .box2{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .box2:hover{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .box2{
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ /* background-color: rgba(0, 0, 0, 0); */
|
|
|
+ background-color: red;
|
|
|
+ /* opcity 控制元素的透明度 取值范围0-1 */
|
|
|
+ /* opacity: 0.9; */
|
|
|
+
|
|
|
+ /* display: none; */
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <div class="box">
|
|
|
+ <div class="box2"></div>
|
|
|
+ <span>hello</span>
|
|
|
+ </div>
|
|
|
+</body>
|
|
|
+</html>
|