focus-left-right.vue
889 Bytes
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
<template>
<div class="focus-left-right">
<a v-for="item in floor" :href="item.url | transformBlk" :title="item.title">
<img v-bind:src="item.src | resize 250 250">
</a>
</div>
</template>
<script>
module.exports = {
props: ['floor']
};
</script>
<style>
.focus-left-right {
padding: 30px 15px;
width: 100%;
overflow-x: auto;
white-space: nowrap;
font-size: 0;
background: #fff;
-webkit-overflow-scrolling: touch;
/* stylelint-disable */
&::-webkit-scrollbar {
display:none;
}
/* stylelint-enable */
a {
display: inline-block;
margin: 0 15px;
width: 250px;
height: 250px;
}
img {
width: 100%;
height: 100%;
}
}
</style>