Added test html + css to play with various effects without changing pluging code.
This commit is contained in:
parent
c4de37523a
commit
33e54840f6
54
test.css
Normal file
54
test.css
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
:root {
|
||||||
|
--stripe-size: 100px;
|
||||||
|
--color1: #c44;
|
||||||
|
--color2: #313131;
|
||||||
|
--duration: 4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stripe {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stripe::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: calc(-1 * var(--stripe-size));
|
||||||
|
width: calc(100% + var(--stripe-size));
|
||||||
|
height: 100%;
|
||||||
|
background: repeating-linear-gradient(45deg, var(--color2) 25%, var(--color2) 50%, var(--color1) 50%, var(--color1) 75%);
|
||||||
|
background-size: var(--stripe-size) var(--stripe-size);
|
||||||
|
-webkit-animation: stripeTransform var(--duration) linear infinite;
|
||||||
|
animation: stripeTransform var(--duration) linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@keyframes stripeTransform {
|
||||||
|
0% {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translateX(calc(var(--stripe-size) * 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes stripeBackgroundPosition {
|
||||||
|
0% {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: calc(var(--stripe-size) * 1) 0;
|
||||||
|
}
|
||||||
|
}
|
15
test.html
Normal file
15
test.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<!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>Document</title>
|
||||||
|
<link href="test.css" rel="stylesheet" type="text/css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="stripe">
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
x
Reference in New Issue
Block a user