<template>
<div class="wraper">
<template>
Scroll down to see the bottom-right button.
<el-backtop target=".wraper">
<div
style="{
height: 100%;
width: 100%;
background-color: #f2f5f6;
box-shadow: 0 0 6px rgba(0,0,0, .12);
text-align: center;
line-height: 40px;
color: #1989fa;
}"
>
UP
</div>
</el-backtop>
</template>
<div>返回顶部</div>
<div>返回顶部</div>
<div>返回顶部</div>
<div>返回顶部</div>
<div>返回顶部</div>
<div>返回顶部</div&g

本文介绍如何结合Vue.js与Element-UI库,实现页面滚动时的回到顶部组件BackTop。通过配置和自定义样式,使得用户能够轻松点击回到页面顶部。
最低0.47元/天 解锁文章
1014

被折叠的 条评论
为什么被折叠?



