Skip to content

Commit 911f1b4

Browse files
committed
feat: add image animation
1 parent 56dc639 commit 911f1b4

File tree

1 file changed

+58
-19
lines changed

1 file changed

+58
-19
lines changed

src/components/Introduction.vue

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
<template>
2-
<div class="container-width text-align-center">
2+
<div class="container-width">
33
<div>
44
<!-- vue -->
5-
<img src="@/assets/img/vue-logo.svg" alt="vue-logo" class="img-size" />
6-
<h1>The Progressive JavaScript Framework</h1>
7-
<p>Vuetify is a Vue UI Library with beautifully handcrafted Material Components. No design skills required — everything you need to create amazing applications is at your fingertips.</p>
8-
<a href="https://vuejs.org/index.html" target="_blank">What is vue.js</a><br /><br />
5+
<img src="@/assets/img/vue-logo.svg" alt="vue-logo" class="img-size vue-logo" />
6+
<div class="text-align-center">
7+
<h1>The Progressive JavaScript Framework</h1>
8+
<p>Vuetify is a Vue UI Library with beautifully handcrafted Material Components. No design skills required — everything you need to create amazing applications is at your fingertips.</p>
9+
<a href="https://vuejs.org/index.html" target="_blank">What is vue.js</a><br />
10+
</div>
911
</div>
10-
<div class="margin-top-50">
12+
<div class="margin-top-40">
1113
<!-- d3 -->
12-
<img src="@/assets/img/d3.svg" alt="d3-logo" class="img-size" />
13-
<h1>Data-Driven Documents</h1>
14-
<p>
15-
D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS. D3’s emphasis on web standards gives you the full capabilities
16-
of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.
17-
</p>
18-
<a href="https://d3js.org/" target="_blank">What is d3.js</a><br /><br />
14+
<img src="@/assets/img/d3.svg" alt="d3-logo" class="img-size d3-logo" />
15+
<div class="text-align-center">
16+
<h1>Data-Driven Documents</h1>
17+
<p>
18+
D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS. D3’s emphasis on web standards gives you the full capabilities
19+
of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.
20+
</p>
21+
<a href="https://d3js.org/" target="_blank">What is d3.js</a><br />
22+
</div>
1923
</div>
20-
<div class="margin-top-50">
24+
<div class="margin-top-40 text-align-center">
2125
<!-- vuetify -->
2226
<img src="@/assets/img/vuetify-logo-light-atom.svg" alt="vuetify-logo" class="img-size vuetify-logo" />
2327
<h1>Material Design Framework</h1>
@@ -39,21 +43,37 @@ export default {
3943
margin: 0 auto;
4044
}
4145
.img-size {
42-
width: 300px;
43-
height: 300px;
46+
width: 200px;
47+
height: 200px;
4448
}
45-
.margin-top-50 {
46-
margin-top: 50px;
49+
.margin-top-40 {
50+
margin-top: 40px;
4751
}
4852
49-
.vuetify-logo {
53+
.vuetify-logo, .vue-logo, .d3-logo {
5054
pointer-events: none;
5155
}
5256
57+
.d3-logo {
58+
width: 180px;
59+
height: 180px;
60+
}
61+
62+
.vuetify-logo {
63+
width: 220px;
64+
height: 220px;
65+
}
66+
5367
@media (prefers-reduced-motion: no-preference) {
5468
.vuetify-logo {
5569
animation: vuetify-logo-spin infinite 16s linear;
5670
}
71+
.vue-logo {
72+
animation: 10s linear 0s infinite alternate move-vue-img;
73+
}
74+
.d3-logo {
75+
animation: 10s linear 0s infinite alternate move-d3-img;
76+
}
5777
}
5878
5979
@keyframes vuetify-logo-spin {
@@ -64,4 +84,23 @@ export default {
6484
transform: rotate(360deg);
6585
}
6686
}
87+
88+
@keyframes move-vue-img {
89+
from {
90+
margin-left: 0%;
91+
}
92+
93+
to {
94+
margin-left: 80%;
95+
}
96+
}
97+
@keyframes move-d3-img {
98+
from {
99+
margin-left: 80%;
100+
}
101+
102+
to {
103+
margin-left: 0%;
104+
}
105+
}
67106
</style>

0 commit comments

Comments
 (0)