Skip to content

Commit

Permalink
after
Browse files Browse the repository at this point in the history
  • Loading branch information
heshamelmasry77 committed Nov 9, 2023
1 parent fdb1e7e commit 22b4f12
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 0 deletions.
72 changes: 72 additions & 0 deletions week-6-start/transition-btn-example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Transition Example - BTN Animation</title>
<style>
* {
box-sizing: border-box;
}

body {
display: flex;
min-height: 100vh;
background-color: lightgray;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 1rem;
}

.btn {
font-size: 2rem;
outline: none;
border: none;
border-radius: .5rem;
padding: 1rem;
background-color: #2C7DFA;
cursor: pointer;
color: white;
}

.btn-hide {
opacity: .7;
transition: opacity 500ms;
}

.btn-hide:hover {
opacity: 1;
}

.btn-hide:focus {
opacity: 0;
}

.btn-change {
transition: color, background-color, padding;
transition-duration: 500ms;
}

.btn-change:hover {
padding: 2rem;
}

.btn-change:focus {
color: #BADA55;
background-color: #C0FFEE;
}

</style>
</head>
<body>

<button class="btn btn-hide">
Click me to hide me
</button>

<button class="btn btn-change">
Hello
</button>

</body>
</html>
42 changes: 42 additions & 0 deletions week-6-start/transition.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>transition</title>
<style>
.my-container {
background-color: #AA1111;
color: white;

font-size: 3rem;
width: 400px;
height: 400px;
/*property duration linear */
/*transition: all 2000ms ease-in;*/
/*transition: all 2000ms ease-out;*/
transition: color 1s, background-color 2s ease-in-out;

/*ease in*/
/*slow in the beginning*/

/*ease out*/
/*slow in the end*/

/*transition-property: all;*/
/*transition-duration: 1s;*/

}

.my-container:hover {
background-color: #BADA55;
color: black;
}
</style>
</head>
<body>

<div class="my-container">
My div is here
</div>
</body>
</html>

0 comments on commit 22b4f12

Please sign in to comment.