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

Mini Program to Implement Sieve Lottery

This article example shares the specific code of ...

How to prevent website content from being included in search engines

Usually the goal of building a website is to have...

Explanation of several ways to run Tomcat under Linux

Starting and shutting down Tomcat under Linux In ...

A complete record of a Mysql deadlock troubleshooting process

Preface The database deadlocks I encountered befo...

Postman automated interface testing practice

Table of contents Background Description Creating...

How to add color mask to background image in CSS3

Some time ago, during development, I encountered ...

Tutorial on installing Android Studio on Ubuntu 19 and below

Based on past experience, taking notes after comp...

Detailed explanation of this pointing in JS arrow function

Arrow function is a new feature in ES6. It does n...

Example code for implementing 3D Rubik's Cube with CSS

Let's make a simple 3D Rubik's Cube today...

Use of kubernetes YAML files

Table of contents 01 Introduction to YAML files Y...

Vue implements adding watermark effect to the page

Recently, when I was working on a project, I was ...

MySQL query data by hour, fill in 0 if there is no data

Demand background A statistical interface, the fr...

Solve the problem of no my.cnf file in /etc when installing mysql on Linux

Today I wanted to change the mysql port, but I fo...