zoukankan      html  css  js  c++  java
  • element-ui中backTop组件的使用

    其实官方示例给的挺明确的,只是我一开始自作聪明。。。

    把<template></template>给干掉了,然后就各种各样的不能实现,

    我总结下:

        1.首先给一个要返回顶部的地方,而且得是个有高度的

        例子: <div class='firset-herad></div> 这是我最外层的div,给.firset-herad设置一个高度,height:100%

        2.在<div class='firset-herad>中最上边写<template>

        例子:<div class='firset-herad'>

             <template>

              <el-backtop

                    target='.firset-herad' //触发滚动的对象

                    :right='40'       //距离右边的距离

                    :bottom='100'   //距离底部的距离

                    ;visibility-height='400'> //滚动高度达到此参数值才出现,控制显示与隐藏

               <div>

                <i class='el-icon-top'></i>  //我这里使用的element-ui中的图标当做按钮

               </div>

              </el-backtop>

             </template> 

           </div>

  • 相关阅读:
    位军营 20190919-4 测试,结对要求
    位军营 20190919-5 代码规范,结对要求
    国内源
    hexo安装-nodejs
    python调用chrome打开指定网址
    生成证书,用于签名Android应用
    cygwin64-安装包管理工具
    Android-删除指定包名的App
    pyqt5加载网页的简单使用
    打包python到exe
  • 原文地址:https://www.cnblogs.com/a973692898/p/13272763.html
Copyright © 2011-2022 走看看