Element Backtop回到顶部的具体使用
这篇文章主要介绍了ElementBacktop回到顶部的具体使用,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学
这篇文章主要介绍了Element Backtop回到顶部的具体使用,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
组件— 回到顶部
基础用法
<template>
Scroll down to see the bottom-right button. <el-backtop target=”.page-component__scroll .el-scrollbar__wrap”></el-backtop> </template> |
自定义显示内容
<template>
Scroll down to see the bottom-right button. <el-backtop target=”.page-component__scroll .el-scrollbar__wrap” :bottom=”100″> <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> |
Attributes
Events
关于element-ui el-backtop返回顶部组件无效问题
el-backtop绑定的盒子,需要一个滚动样式:overflow-y: scroll;
<template>
<div id=”app”> <router-view /> // 绑定app盒子 <el-backtop target=”#app” :visibility-height=”100″></el-backtop> </div> </template> <script> export default { name: “App”, data() { return {}; }, methods: {}, mounted() {} }; </script> <style> #app { font-family: “Helvetica Neue”, Helvetica, “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “微软雅黑”, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; width: 100%; height: 100%; /* 这里给app一个滚动效果 */ overflow-y: scroll; } </style> |
到此这篇关于Element Backtop回到顶部的具体使用的文章就介绍到这了,希望大家以后多多支持!

下载说明:
1. 本站所有资源来源于网络和用户上传,如有侵权请联系站长
2. 本站分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,商用请支持正版!不得违反国家法律,否则后果自负!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
本站的资源均来自于互联网,仅为资源共享、学习参考之目的,其版权均归原作者及其网站所有,如有侵权请留言联系:admin,转转请注明出处:http://zhanmr.com/7129.htm