My use case is something like this,
- I got the star rank from the back-end as a digit(1,2,3,4,5).
- If it's number 3 I want to color first 3 stars in yellow and reaming to default color. How do I achieve this using Vue JS?
This is my code.
<template>
<div id="app">
<span class="demo">★★★★★</span>
</div>
</template>
<script>
export default {
name: 'app',
data () {
return {
}
},
methods:{
}
}
</script>
<style>
.demo{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
font-size: 6em;
color:yellow;
text-shadow: 0 0 15px blue;
}
</style>
