commit | author | age
|
d3f921
|
1 |
<template> |
I |
2 |
<div id="components-layout-basic"> |
|
3 |
<a-layout> |
|
4 |
<a-layout-header>Header</a-layout-header> |
|
5 |
<a-layout> |
|
6 |
<div class="blog-main"> |
|
7 |
<a-row> |
|
8 |
<a-col v-bind="colApiLeft"> |
|
9 |
<boxLeft></boxLeft> |
|
10 |
</a-col> |
|
11 |
<a-col v-bind="colApiMain "> |
|
12 |
<box5></box5> |
|
13 |
<box5></box5> |
|
14 |
<a-pagination v-model="current" :total="50" show-less-items /> |
|
15 |
</a-col> |
|
16 |
<a-col v-bind="colApiRight"> |
|
17 |
<boxRight></boxRight> |
|
18 |
</a-col> |
|
19 |
</a-row> |
|
20 |
</div> |
|
21 |
<!-- <a-layout-sider v-bind="sliderApi">Sider</a-layout-sider> |
|
22 |
<a-layout-content>Content</a-layout-content> |
|
23 |
<a-layout-sider v-bind="sliderApi">Sider</a-layout-sider> --> |
|
24 |
</a-layout> |
|
25 |
<a-layout-footer>Footer</a-layout-footer> |
|
26 |
</a-layout> |
|
27 |
</div> |
|
28 |
</template> |
|
29 |
|
|
30 |
<script> |
|
31 |
import boxLeft from "./boxLeft.vue" |
|
32 |
import boxRight from "./boxRight.vue" |
|
33 |
import box5 from "./box5.vue" |
|
34 |
export default { |
|
35 |
components: { |
|
36 |
boxLeft, |
|
37 |
boxRight, |
|
38 |
box5 |
|
39 |
}, |
|
40 |
|
|
41 |
data() { |
|
42 |
return { |
|
43 |
current: 2, |
|
44 |
sliderApi: { |
|
45 |
collapsible: true, //是否可收起 |
|
46 |
|
|
47 |
collapsedWidth: 0 //收缩宽度,设置为 0 会出现特殊 trigger |
|
48 |
}, |
|
49 |
colApiLeft: { |
|
50 |
xs: 0, |
|
51 |
sm: 0, |
|
52 |
md: 0, |
|
53 |
lg: 8, |
|
54 |
xl: 8, |
|
55 |
xxl: 6, |
|
56 |
}, |
|
57 |
colApiRight: { |
|
58 |
xs: 0, |
|
59 |
sm: 0, |
|
60 |
md: 0, |
|
61 |
lg: 0, |
|
62 |
xl: 0, |
|
63 |
xxl: 4, |
|
64 |
}, |
|
65 |
colApiMain: { |
|
66 |
xs: 24, |
|
67 |
sm: 24, |
|
68 |
md: 24, |
|
69 |
lg: 14, |
|
70 |
xl: 14, |
|
71 |
xxl: 14, |
|
72 |
} |
|
73 |
} |
|
74 |
} |
|
75 |
} |
|
76 |
</script> |
|
77 |
|
|
78 |
<style lang="less"> |
|
79 |
#components-layout-basic { |
|
80 |
text-align: center; |
|
81 |
height: 100%; |
|
82 |
width: 100%; |
|
83 |
margin: 0; |
|
84 |
padding: 0; |
|
85 |
|
|
86 |
.ant-layout-header, |
|
87 |
.ant-layout-footer { |
|
88 |
background: #7dbcea; |
|
89 |
color: #fff; |
|
90 |
} |
|
91 |
|
|
92 |
.ant-layout-footer { |
|
93 |
line-height: 1.5; |
|
94 |
} |
|
95 |
|
|
96 |
.ant-layout-sider { |
|
97 |
background: #3ba0e9; |
|
98 |
color: #fff; |
|
99 |
line-height: 120px; |
|
100 |
} |
|
101 |
|
|
102 |
.ant-col, |
|
103 |
.ant-layout-content { |
|
104 |
height: 100%; |
|
105 |
} |
|
106 |
|
|
107 |
// >.ant-layout { |
|
108 |
// width: 100%; |
|
109 |
// min-height: 100%; |
|
110 |
// } |
|
111 |
|
|
112 |
// >.ant-layout:last-child { |
|
113 |
// margin: 0; |
|
114 |
// } |
|
115 |
} |
|
116 |
|
|
117 |
|
|
118 |
.h1, |
|
119 |
.h2, |
|
120 |
.h3, |
|
121 |
.h4, |
|
122 |
.h5, |
|
123 |
.h6, |
|
124 |
h1, |
|
125 |
h2, |
|
126 |
h3, |
|
127 |
h4, |
|
128 |
h5, |
|
129 |
h6 { |
|
130 |
font-weight: 400; |
|
131 |
} |
|
132 |
|
|
133 |
span, |
|
134 |
p { |
|
135 |
font-size: 17px; |
|
136 |
letter-spacing: 0.8px; |
|
137 |
line-height: 30px; |
|
138 |
} |
|
139 |
|
|
140 |
.fadeInLeft { |
|
141 |
-webkit-animation-name: "fadeInLeft"; |
|
142 |
-webkit-animation-duration: 1s; |
|
143 |
-webkit-animation-iteration-count: 1; |
|
144 |
} |
|
145 |
|
|
146 |
.fadeInRight { |
|
147 |
-webkit-animation-name: "fadeInRight"; |
|
148 |
-webkit-animation-duration: 1s; |
|
149 |
-webkit-animation-iteration-count: 1; |
|
150 |
} |
|
151 |
|
|
152 |
.blog-main { |
|
153 |
padding-left: 5%; |
|
154 |
padding-right: 5%; |
|
155 |
} |
|
156 |
|
|
157 |
|
|
158 |
|
|
159 |
/*左右两边的盒子容器*/ |
|
160 |
.blog-cell { |
|
161 |
opacity: 0.8; |
|
162 |
padding: 0px 25px 10px; |
|
163 |
} |
|
164 |
|
|
165 |
/*左边部分*/ |
|
166 |
.blog-left-side { |
|
167 |
position: sticky; |
|
168 |
// top: 80px; |
|
169 |
padding-left: 2%; |
|
170 |
/*padding-right: 2%;*/ |
|
171 |
z-index: 100; |
|
172 |
} |
|
173 |
|
|
174 |
/*中间部分*/ |
|
175 |
.blog-body { |
|
176 |
padding-top: 10px; |
|
177 |
/*padding-left: 3%;*/ |
|
178 |
/*padding-right: 3%;*/ |
|
179 |
} |
|
180 |
|
|
181 |
/*右边部分*/ |
|
182 |
.blog-right-side { |
|
183 |
position: sticky; |
|
184 |
top: -19%; |
|
185 |
padding-top: 10px; |
|
186 |
/*padding-left: 2%;*/ |
|
187 |
/*padding-right: 2%;*/ |
|
188 |
z-index: 100; |
|
189 |
} |
|
190 |
|
|
191 |
div .blog-right-side-meta div { |
|
192 |
padding-left: 6%; |
|
193 |
padding-right: 6%; |
|
194 |
margin-bottom: 3%; |
|
195 |
} |
|
196 |
|
|
197 |
|
|
198 |
/*--------------------- |
|
199 |
| 核心盒子构成start | |
|
200 |
------- ---------------*/ |
|
201 |
.blog-container { |
|
202 |
border-radius: 15px; |
|
203 |
background-color: white; |
|
204 |
|
|
205 |
line-height: 1.4; |
|
206 |
white-space: nowrap; |
|
207 |
/*规定段落中的文本不进行换行:*/ |
|
208 |
text-align: center; |
|
209 |
padding-top: 20px; |
|
210 |
padding-bottom: 20px; |
|
211 |
max-height: 300px; |
|
212 |
/*margin-top: 10px;*/ |
|
213 |
/*min-height: 200px;*/ |
|
214 |
|
|
215 |
// overflow-x: hidden; |
|
216 |
// overflow-y: overlay; |
|
217 |
// display: block; |
|
218 |
|
|
219 |
padding-top: 10px; |
|
220 |
padding-bottom: 20px; |
|
221 |
overflow: hidden; |
|
222 |
|
|
223 |
|
|
224 |
} |
|
225 |
|
|
226 |
.show-line { |
|
227 |
border-top: 1px solid #999; |
|
228 |
} |
|
229 |
|
|
230 |
.blog-scroll { |
|
231 |
padding-top: 10px; |
|
232 |
max-height: 200px; |
|
233 |
|
|
234 |
overflow-x: hidden; |
|
235 |
overflow-y: overlay; |
|
236 |
} |
|
237 |
|
|
238 |
|
|
239 |
.blog-scroll:hover::-webkit-scrollbar { |
|
240 |
display: block; |
|
241 |
} |
|
242 |
|
|
243 |
.blog-scroll:hover::-webkit-scrollbar { |
|
244 |
display: block; |
|
245 |
} |
|
246 |
|
|
247 |
.blog-scroll::-webkit-scrollbar { |
|
248 |
width: 5px; |
|
249 |
display: none; |
|
250 |
} |
|
251 |
|
|
252 |
.blog-scroll::-webkit-scrollbar-thumb { |
|
253 |
background-color: rgba(153, 154, 170, 0.3); |
|
254 |
border-radius: 2px; |
|
255 |
} |
|
256 |
|
|
257 |
/*margin滚动条上偏移*/ |
|
258 |
.blog-scroll::-webkit-scrollbar-track { |
|
259 |
margin-top: 5px; |
|
260 |
margin-bottom: 5px; |
|
261 |
} |
|
262 |
|
|
263 |
|
|
264 |
// 动画 |
|
265 |
@-webkit-keyframes fadeInLeft { |
|
266 |
0% { |
|
267 |
opacity: 0; |
|
268 |
-webkit-transform: translateX(-120px); |
|
269 |
} |
|
270 |
|
|
271 |
100% { |
|
272 |
opacity: 1; |
|
273 |
-webkit-transform: translateX(0); |
|
274 |
} |
|
275 |
} |
|
276 |
|
|
277 |
@keyframes fadeInLeft { |
|
278 |
0% { |
|
279 |
opacity: 0; |
|
280 |
transform: translateX(-120px); |
|
281 |
} |
|
282 |
|
|
283 |
100% { |
|
284 |
opacity: 1; |
|
285 |
transform: translateX(0); |
|
286 |
} |
|
287 |
} |
|
288 |
|
|
289 |
@-webkit-keyframes fadeInRight { |
|
290 |
0% { |
|
291 |
opacity: 0; |
|
292 |
-webkit-transform: translateX(120px); |
|
293 |
} |
|
294 |
|
|
295 |
100% { |
|
296 |
opacity: 1; |
|
297 |
-webkit-transform: translateX(0); |
|
298 |
} |
|
299 |
} |
|
300 |
|
|
301 |
@keyframes fadeInRight { |
|
302 |
0% { |
|
303 |
opacity: 0; |
|
304 |
transform: translateX(120px); |
|
305 |
} |
|
306 |
|
|
307 |
100% { |
|
308 |
opacity: 1; |
|
309 |
transform: translateX(0); |
|
310 |
} |
|
311 |
} |
|
312 |
|
|
313 |
@-webkit-keyframes fade { |
|
314 |
0% { |
|
315 |
opacity: 0; |
|
316 |
} |
|
317 |
|
|
318 |
100% { |
|
319 |
opacity: 1; |
|
320 |
} |
|
321 |
} |
|
322 |
|
|
323 |
@keyframes fade { |
|
324 |
0% { |
|
325 |
opacity: 0; |
|
326 |
} |
|
327 |
|
|
328 |
100% { |
|
329 |
opacity: 1; |
|
330 |
} |
|
331 |
} |
|
332 |
</style> |