1.box-2:before {
2 content: "";
3 display: block;
4 position: absolute;
5 top: 0;
6 bottom: 0;
7 left: 0;
8 right: 0;
9 background: rgba(125, 2, 150, 0.5);
10 transition: background .3s linear;
11}
12
13 .box-2 {
14 position: relative;
15 float: left;
16 cursor: pointer;
17}