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

Mysql get table comment field operation

I won't say much nonsense, let's just loo...

IDEA graphic tutorial on configuring Tomcat server and publishing web projects

1. After creating the web project, you now need t...

Vue implements fuzzy query-Mysql database data

Table of contents 1. Demand 2. Implementation 3. ...

Vue/react single page application back without refresh solution

Table of contents introduction Why bother? Commun...

Summary of some tips on MySQL index knowledge

Table of contents 1. Basic knowledge of indexing ...

Binary Type Operations in MySQL

This article mainly introduces the binary type op...

How to apply TypeScript classes in Vue projects

Table of contents 1. Introduction 2. Use 1. @Comp...

How to open the port in Centos7

The default firewall of CentOS7 is not iptables, ...

MySQL sorting using index scan

Table of contents Install sakila Index Scan Sort ...

React implements multi-component value transfer function through conetxt

The effect of this function is similar to vue的pro...

Implementation of Docker Compose multi-container deployment

Table of contents 1. WordPress deployment 1. Prep...

How to configure pseudo-static and client-adaptive Nginx

The backend uses the thinkphp3.2.3 framework. If ...

Docker data management and network communication usage

You can install Docker and perform simple operati...

JSONP cross-domain simulation Baidu search

Table of contents 1. What is JSONP 2. JSONP cross...