代码需组合其他 css 扩展使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.contact-page {
.item {
width: calc(50% - 20px);
margin-right: 40px;
margin-bottom: 58px;
&:nth-child(2n) {
margin-right: 0;
}
.text-con {
position: relative;
height: 255px;
}
.img {
height: 100%;
opacity: 1;
.transition-all-ease();
}
.bor {
position: absolute;
top: 30px;
left: 30px;
z-index: 1;
border: 1px solid @---thime-color;
width: calc(100% - 60px);
height: calc(100% - 60px);
padding: 30px;
.transform-scale-rotate(0);
.transition-all-ease();
visibility: hidden;
opacity: 0;
.dd1 {
margin: 5px;
}
}
&:hover {
.title {
color: @---thime-color;
}
.img {
opacity: .4;
.transition-all-ease();
}
.bor {
.transition-all-ease();
.transform-scale-rotate(1, 0deg);
visibility: visible;
opacity: 1;
}
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<div class="contact-page rel margin-top-xxl margin-bottom-xxxl flex flex-wrap">
<div class="item">
<div class="title text-lg text-white text-center">
北京总部
</div>
<div class="text-con">
<div class="img margin-top flex justify-center align-center" style="background: url() no-repeat center; background-size: cover;">
</div>
<div class="bor text-white text-dfs flex align-center">
<div class="">
<div class="dd1">
地址:北京丰台
</div>
<div class="dd1">
电话:13522841811
</div>
<div class="dd1">
传真:0123456799
</div>
</div>
</div>
</div>
</div>
</div>

效果请参考 华软实业 网站