File tree Expand file tree Collapse file tree 1 file changed +85
-43
lines changed Expand file tree Collapse file tree 1 file changed +85
-43
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" exception" >
3
- <div class =" img" >
4
- <img :src =" config[type].img" />
3
+ <div class =" imgBlock" >
4
+ <div class =" imgEle" :style =" {backgroundImage: `url(${config[type].img})`}" >
5
+ </div >
5
6
</div >
6
7
<div class =" content" >
7
8
<h1 >{{ config[type].title }}</h1 >
8
9
<div class =" desc" >{{ config[type].desc }}</div >
9
- <div class =" action " >
10
+ <div class =" actions " >
10
11
<a-button type =" primary" @click =" handleToHome" >返回首页</a-button >
11
12
</div >
12
13
</div >
@@ -36,53 +37,94 @@ export default {
36
37
}
37
38
}
38
39
</script >
40
+ <style lang="less">
41
+ @import " ~ant-design-vue/lib/style/index" ;
39
42
40
- < style lang="less" scoped>
41
- .exception {
42
- min-height : 500 px ;
43
- height : 80% ;
44
- align-items : center ;
45
- text-align : center ;
46
- margin-top : 150 px ;
47
- .img {
48
- display : inline-block ;
49
- padding-right : 52 px ;
50
- zoom : 1 ;
51
- img {
52
- height : 360 px ;
53
- max-width : 430 px ;
54
- }
43
+ .exception {
44
+ display : flex ;
45
+ align-items : center ;
46
+ height : 80% ;
47
+ min-height : 500 px ;
48
+
49
+ .imgBlock {
50
+ flex : 0 0 62.5 % ;
51
+ width : 62.5 % ;
52
+ padding-right : 152 px ;
53
+ zoom : 1 ;
54
+ & ::before ,
55
+ & ::after {
56
+ content : ' ' ;
57
+ display : table ;
55
58
}
56
- .content {
57
- display : inline-block ;
58
- flex : auto ;
59
- h1 {
60
- color : #434e59 ;
61
- font-size : 72px ;
62
- font-weight : 600 ;
63
- line-height : 72px ;
64
- margin-bottom : 24px ;
65
- }
66
- .desc {
67
- color : rgba (0 , 0 , 0 , .45 );
68
- font-size : 20px ;
69
- line-height : 28px ;
70
- margin-bottom : 16px ;
71
- }
59
+ & ::after {
60
+ clear : both ;
61
+ height : 0 ;
62
+ font-size : 0 ;
63
+ visibility : hidden ;
72
64
}
73
65
}
74
66
75
- .mobile {
76
- .exception {
77
- margin-top : 30px ;
78
- .img {
79
- padding-right : unset ;
67
+ .imgEle {
68
+ float : right ;
69
+ width : 100% ;
70
+ max-width : 430px ;
71
+ height : 360px ;
72
+ background-repeat : no-repeat ;
73
+ background-position : 50% 50% ;
74
+ background-size : contain ;
75
+ }
80
76
81
- img {
82
- height : 40% ;
83
- max-width : 80% ;
84
- }
77
+ .content {
78
+ flex : auto ;
79
+
80
+ h1 {
81
+ margin-bottom : 24px ;
82
+ color : #434e59 ;
83
+ font-weight : 600 ;
84
+ font-size : 72px ;
85
+ line-height : 72px ;
86
+ }
87
+
88
+ .desc {
89
+ margin-bottom : 16px ;
90
+ color : @text-color-secondary ;
91
+ font-size : 20px ;
92
+ line-height : 28px ;
93
+ }
94
+
95
+ .actions {
96
+ button :not (:last-child ) {
97
+ margin-right : 8px ;
85
98
}
86
99
}
87
100
}
101
+ }
102
+
103
+ @media screen and (max-width : @screen-xl ) {
104
+ .exception {
105
+ .imgBlock {
106
+ padding-right : 88px ;
107
+ }
108
+ }
109
+ }
110
+
111
+ @media screen and (max-width : @screen-sm ) {
112
+ .exception {
113
+ display : block ;
114
+ text-align : center ;
115
+ .imgBlock {
116
+ margin : 0 auto 24px ;
117
+ padding-right : 0 ;
118
+ }
119
+ }
120
+ }
121
+
122
+ @media screen and (max-width : @screen-xs ) {
123
+ .exception {
124
+ .imgBlock {
125
+ margin-bottom : -24px ;
126
+ overflow : hidden ;
127
+ }
128
+ }
129
+ }
88
130
</style >
You can’t perform that action at this time.
0 commit comments