Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
</head>
<body>

<div>
<div class="box spin">
<h1>Spin</h1>
</div>
</div>
<div class="box move">
<h1>Move</h1>
</div>
Expand All @@ -29,7 +31,7 @@ <h1>Grow</h1>
<h1>Shrink</h1>
</div>

<div class="box pullUp">
<div class="box pullUp" id="translate">
<h2> Pull Up</h2>
</div>
<div class="box pullUp2">
Expand Down
42 changes: 26 additions & 16 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ body{


.box{
border-radius: 20%;
float: left;
height:25vh;
width:25vh;
Expand All @@ -15,27 +16,29 @@ body{

.spin {
animation-name: spin;
animation-duration: 4s;
animation-duration: 10s;
animation-iteration-count: infinite;
animation-direction: reverse;
}
.move {
animation-name: move-it;
animation-duration: 5s;
animation-iteration-count: infinite;
background-color: red;
}
.pulse {
animation: pulse 10s infinite;
animation: pulse 100s infinite;
}
.fade {
animation: fade 10s infinite;
animation: fade 5s infinite;
}

.move-2{
animation: move-2 10s 5s infinite;
}
.grow{
animation: grow 5s infinite;
background-image:
}

.shrink{
Expand All @@ -45,10 +48,12 @@ body{
.pullUp{
animation: pullUp 5s infinite;
transform-origin: 50% 100%;
background-color: yellow;
}
.pullUp2 {
animation: pullUp2 5s infinite;
transform-origin: 50% 100%;
background-color: orange;
}

#translate:active{
Expand All @@ -61,24 +66,26 @@ body{
}

@keyframes spin {
100%{
transform: rotate(360deg);
50%{
transform: scale(2,2) rotate(360deg);
}
}

@keyframes move-it {
99%{
transform: translate(50vw);
50%{
transform: translate(80vw);

}
/*from { transform: translate(1vw)}
to{ transform: translate3d(500vw)}*/
}

@keyframes pulse {
0%, 100% {
background-color: blue;
}
50% {
background-color: red;
background-color: purple;
}
}

Expand All @@ -89,19 +96,22 @@ body{
}

@keyframes move-2 {
50%{
33%{
transform: translate(-50vw, 50vh);
}
66%{
transform: translate(0vw, 80vh);
}
}
@keyframes grow {
50%{
transform: scale(2,2);
transform: scale(1,2);
}
}

@keyframes shrink {
50%{
transform: scale(0,0);
transform: scale(0,2);
}
}

Expand All @@ -112,19 +122,19 @@ body{
transform: scaleY(0.1);
}
40% {
transform: scaleY(1.02);
transform: scaleY(2);
}
60% {
transform: scaleY(0.98);
transform: scaleY(0.75);
}
80% {
transform: scaleY(1.01);
transform: scaleY(1.1);
}
100% {
transform: scaleY(0.98);
transform: scaleY(0.9);
}
80% {
transform: scaleY(1.01);
transform: scaleY(1.1);
}
100% {
transform: scaleY(1);
Expand Down