Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to style on-click in react/ vuejs router

<template>
  <div>
    <router-link to="/" class="home"> Home </router-link>
  </div>
</template>
<script></script>
<style lang="css" scoped>
.home {
  color: black; /**/
}
.home:active {
  color: green; /* changes the color of the home text to green when clicked*/
}
</style>
 
PREVIOUS NEXT
Tagged: #style #vuejs #router
ADD COMMENT
Topic
Name
9+1 =