Skip to content

Commit c8e96e2

Browse files
committed
chore: sync Exception style #186
1 parent 9025539 commit c8e96e2

File tree

1 file changed

+85
-43
lines changed

1 file changed

+85
-43
lines changed
Lines changed: 85 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<template>
22
<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>
56
</div>
67
<div class="content">
78
<h1>{{ config[type].title }}</h1>
89
<div class="desc">{{ config[type].desc }}</div>
9-
<div class="action">
10+
<div class="actions">
1011
<a-button type="primary" @click="handleToHome">返回首页</a-button>
1112
</div>
1213
</div>
@@ -36,53 +37,94 @@ export default {
3637
}
3738
}
3839
</script>
40+
<style lang="less">
41+
@import "~ant-design-vue/lib/style/index";
3942
40-
<style lang="less" scoped>
41-
.exception {
42-
min-height: 500px;
43-
height: 80%;
44-
align-items: center;
45-
text-align: center;
46-
margin-top: 150px;
47-
.img {
48-
display: inline-block;
49-
padding-right: 52px;
50-
zoom: 1;
51-
img {
52-
height: 360px;
53-
max-width: 430px;
54-
}
43+
.exception {
44+
display: flex;
45+
align-items: center;
46+
height: 80%;
47+
min-height: 500px;
48+
49+
.imgBlock {
50+
flex: 0 0 62.5%;
51+
width: 62.5%;
52+
padding-right: 152px;
53+
zoom: 1;
54+
&::before,
55+
&::after {
56+
content: ' ';
57+
display: table;
5558
}
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;
7264
}
7365
}
7466
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+
}
8076
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;
8598
}
8699
}
87100
}
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+
}
88130
</style>

0 commit comments

Comments
 (0)