November 2017
Beginner to intermediate
398 pages
8h 42m
English
These banners would be prettier if we could animate them when they shrink or grow. We can't rely on CSS transitions since we need to dynamically change the SVG path, so we need another way--we will animate the value of the height property used in the template.
computed: { targetHeight () { return 220 * this.ratio + 40 }, },
This targetHeight property will be calculated only once whenever the ratio changes.
data () { return { height: 0, } },
Read now
Unlock full access