You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
<template>
|
|
<div class="StickyWrapper">
|
|
<slot name="top"/>
|
|
<div class="content">
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped lang="scss">
|
|
.StickyWrapper {
|
|
position: relative;
|
|
height: 100vh;
|
|
.content {
|
|
position: sticky;
|
|
top: 50%;
|
|
transform: translate(0, -50%);
|
|
}
|
|
}
|
|
</style>
|