fix: 🐛 slides displacing when cycling through slides
This commit is contained in:
parent
ed0fa31a0f
commit
0b6f797dc4
1 changed files with 15 additions and 4 deletions
|
@ -44,7 +44,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
offset() {
|
||||
return `margin-left: -${this.activeImage * 100}vw`;
|
||||
return `margin-left: -${this.activeImage * 100}%`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -127,10 +127,11 @@ export default {
|
|||
flex: 0 0 100%;
|
||||
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: center;
|
||||
|
||||
width: 100vw;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0 2em;
|
||||
|
||||
|
@ -139,15 +140,25 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
picture {
|
||||
flex: 0 1 auto;
|
||||
text-align: center;
|
||||
max-height: 80%;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 90%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
flex: 0 0 100%;
|
||||
flex: 1 0 auto;
|
||||
text-align: center;
|
||||
|
||||
p {
|
||||
margin: 0.5em auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue