<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style type="text/css">
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.box {
width: 300px;
height: 100px;
background-color: rgba(112, 76, 182, 0.4);
position: relative;
}
.box:active {
background-color:rgba(112, 76, 182, 0.6);
}
.box::after {
content: "";
width: 100%;
height: 100%;
position: absolute;
background-color: rgba(112, 76, 182, 0.4);
opacity: 0;
transition: width 1s ease-in-out, opacity
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交