-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
131 lines (107 loc) · 8.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example „Cards” - Tailwind CSS Intersection Observer Plugin</title>
<link href="styles.css" rel="stylesheet">
<script defer src="https://unpkg.com/[email protected]/dist/observer.min.js"></script>
</head>
<body class="bg-white p-8 lg:p-12 lg:text-lg">
<div class="max-w-3xl mx-auto overflow-clip">
<h1 class="text-3xl mb-2">Example „Image Cards”</h1>
<h2 class="text-xl mb-12 lg:mb-16"><a href="https://github.com/heidkaemper/tailwindcss-intersect">Tailwind CSS Intersection Plugin</a></h2>
<p class="my-8 lg:my-12">
Scroll down and the images on this page will be animated.<br>
If the images are already in the viewport when the page is loaded, there will be no animation.
Therefore, the performance and loading time of the page will not be affected.
</p>
<p class="my-8 lg:my-12 text-gray-500">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip
ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie
consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim
qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
</p>
<p class="my-8 lg:my-12 text-gray-500">
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum
dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent
luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
erat volutpat.
</p>
<p class="my-8 lg:my-12 text-gray-500">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<div class="grid gap-4 lg:grid-cols-2">
<div class="scale-50 opacity-0 intersect:scale-100 intersect:opacity-100 transition duration-700">
<img src="https://picsum.photos/400?random=1" class="w-full h-96 object-cover bg-slate-300 rounded">
</div>
<div class="scale-50 opacity-0 intersect:scale-100 intersect:opacity-100 transition duration-700 lg:delay-200">
<img src="https://picsum.photos/400?random=2" class="w-full h-96 object-cover bg-slate-300 rounded">
</div>
<div class="scale-50 opacity-0 intersect:scale-100 intersect:opacity-100 transition duration-700">
<img src="https://picsum.photos/400?random=3" class="w-full h-96 object-cover bg-slate-300 rounded">
</div>
<div class="scale-50 opacity-0 intersect:scale-100 intersect:opacity-100 transition duration-700 lg:delay-200">
<img src="https://picsum.photos/400?random=4" class="w-full h-96 object-cover bg-slate-300 rounded">
</div>
</div>
<small class="block text-xs leading-none bg-gray-200 rounded font-mono p-2 my-4 cursor-help opacity-0 intersect:opacity-100 transition duration-1000 intersect-once" title="Classes used in the example above">
scale-50 opacity-0 intersect:scale-100 intersect:opacity-100 transition
</small>
<p class="my-8 lg:my-12 text-gray-500">
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum
dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent
luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
erat volutpat.
</p>
<p class="my-8 lg:my-12 text-gray-500">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip
ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie
consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim
qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
</p>
<div class="translate-x-1/3 intersect:translate-x-0 transition ease-out duration-500">
<img src="https://picsum.photos/600/400?random=1" class="w-full h-80 object-cover bg-slate-300 rounded">
</div>
<small class="block text-xs leading-none bg-gray-200 rounded font-mono p-2 my-4 cursor-help opacity-0 intersect:opacity-100 transition duration-1000 intersect-once" title="Classes used in the example above">
translate-x-1/3 intersect:translate-x-0 transition
</small>
<p class="my-8 lg:my-12 text-gray-500">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<p class="my-8 lg:my-12 text-gray-500">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip
ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie
consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim
qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
</p>
<div class="-translate-x-1/3 intersect:translate-x-0 transition ease-out duration-500">
<img src="https://picsum.photos/600/400?random=2" class="w-full h-80 object-cover bg-slate-300 rounded">
</div>
<small class="block text-xs leading-none bg-gray-200 rounded font-mono p-2 my-4 cursor-help opacity-0 intersect:opacity-100 transition duration-1000 intersect-once" title="Classes used in the example above">
-translate-x-1/3 intersect:translate-x-0 transition
</small>
<p class="my-8 lg:my-12">
This is the end of this page.<br>
Now get creative and build your own!
</p>
<a href="https://github.com/heidkaemper/tailwindcss-intersect/blob/main/docs/example/index.html" class="underline hover:no-underline">Link to Source Code</a>
</div>
</body>
</html>