Home  >  Article  >  Web Front-end  >  Vue2.0 How to add styles to tabs and page switching transitions

Vue2.0 How to add styles to tabs and page switching transitions

亚连
亚连Original
2018-05-30 15:30:003390browse

Below I will share with you a Vue2.0 method of adding styles to tabs and page switching transitions. It has a good reference value and I hope it will be helpful to everyone.

When using vue-router to build a single-page application, how to add styles to the tabs of the current page?

1. Add the routing address to your nav in the app.vue file

2. Still in the app.vue file, add the style

No need to add class anywhere, Just write this name in css, and the style can be changed at will.

How to add transition when switching a single page?

1. In the app.vue file, wrap the router-view in the transition and add a name to the transition.

2. Add css style in app.vue (what is the name of your transition, the first word That’s what)

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

nodejs implements a super simple method to generate QR codes

nodejs mongodb aggregate cascade query operation Example

Method to get dom elements based on vue1 and vue2

The above is the detailed content of Vue2.0 How to add styles to tabs and page switching transitions. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn