Vue implements interface sliding effect

Vue implements interface sliding effect

This article example shares the specific code of Vue to achieve the interface sliding effect for your reference. The specific content is as follows

Project requirements + renderings

1. Project requirements

[Click the bottom navigation bar and there will be a sliding effect when switching pages]

2. Rendering

Code + key code analysis

1. Code

Botnav.vue navigation bar interface

<template>
    <div>
        <transition :name="transitionName">
            <router-view class="Router"></router-view>
        </transition>
 <template>    
  
 <script>    
 export default {
  data () {
    return {
     // Slide from left to right transitionName:'slide-right',    
     } 
</script>   

<style lang="stylus">  
      .Router
            absolute position
            width 100%
            transition all 0.8s ease 
        .slide-left-enter, .slide-right-leave-active    
            opacity 0
            -webkit-transform translate(100%,0)
            transform translate(100%,0)
        .slide-left-leave-active, .slide-right-enter
            opacity 0
            -webkit-transform translate(-100%,0)
            transform translate(-100%,0) 
</style>

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Vue uses Split to encapsulate the universal drag and slide partition panel component
  • The problem and solution of using Vue-scroller page input box not triggering sliding
  • Vue implements left and right linkage sliding pages based on better-scroll
  • Vue implements page switching sliding effect
  • Solve the problem of Vue interface sliding and clicking events on Apple phones
  • How to use fingers to slide between Vue routing pages
  • Implementing left and right sliding effect of page switching based on Vue

<<:  How to enable JMX monitoring through Tomcat

>>:  Detailed explanation of MySQL cursor concepts and usage

Recommend

Detailed explanation of the use of Vue.js draggable text box component

Table of contents Registering Components Adding C...

Vue + element to dynamically display background data to options

need: Implement dynamic display of option values ...

Logrotate implements Catalina.out log rotation every two hours

1. Introduction to Logrotate tool Logrotate is a ...

WeChat applet implements search box function

This article example shares the specific code for...

An IE crash bug

Copy code The code is as follows: <style type=...

Detailed explanation of common usage methods of weixin-js-sdk in vue

Link: https://qydev.weixin.qq.com/wiki/index.php?...

JavaScript tips to help you improve your coding skills

Table of contents 1. Filter unique values 2. Shor...

calc() to achieve full screen background fixed width content

Over the past few years, there has been a trend i...

mysql5.7 installation and configuration tutorial under Centos7.3

This article shares the MySQL 5.7 installation an...

Detailed application of Vue dynamic form

Overview There are many form requirements in the ...

Database SQL statement optimization

Why optimize: With the launch of the actual proje...

CSS3 uses the transition property to achieve transition effects

Detailed description of properties The purpose of...

HTML validate HTML validation

HTML validate refers to HTML validation. It is the...

Detailed steps to install MySQL 5.7 via YUM on CentOS7

1. Go to the location where you want to store the...