update animation1
This commit is contained in:
parent
c497ab3f7f
commit
43e93bc9d4
|
@ -1,12 +1,12 @@
|
||||||
# Button Hover
|
# Button Hover
|
||||||
|
|
||||||
Use a transition to increase the font-size property of the button when you hover your mouse over it.
|
Use a transition to scale the button when you hover your mouse over it.
|
||||||
|
|
||||||
## Desired Outcome
|
## Desired Outcome
|
||||||
|
|
||||||
![outcome](./desired-outcome.gif)
|
![outcome](./desired-outcome.gif)
|
||||||
|
|
||||||
### Self Check
|
### Self Check
|
||||||
- Does the font-size property change to increase the size?
|
- Does the button grow when you hover it?
|
||||||
- Do other properties of the button remain unchanged?
|
- Do other properties of the button remain unchanged?
|
||||||
- Does the `:hover` pseudo-class trigger the transition?
|
- Does the `:hover` pseudo-class trigger the transition?
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 37 KiB |
|
@ -9,28 +9,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
width: 158px;
|
border-radius: 8px;
|
||||||
height: 55px;
|
border: none;
|
||||||
border: 1px solid black;
|
background-color: #2563eb;
|
||||||
border-radius: 5px;
|
color: white;
|
||||||
background-color: white;
|
font-size: 18px;
|
||||||
color: black;
|
padding: 16px 24px;
|
||||||
font-size: small;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SOLUTION */
|
/* SOLUTION */
|
||||||
|
|
||||||
/* disclaimer: duplicating the `button` element here isn't best practice.
|
|
||||||
In your solution you probably put it right inside the existing `button`,
|
|
||||||
which _is_ the best practice.
|
|
||||||
We separated it out here to make it extra clear what has changed. */
|
|
||||||
|
|
||||||
button {
|
button {
|
||||||
transition: font-size 1s ease-out 0.25s;
|
transition: transform .3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover {
|
button:hover {
|
||||||
font-size: x-large;
|
transform: scale(1.2)
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,12 +9,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
width: 158px;
|
border-radius: 8px;
|
||||||
height: 55px;
|
border: none;
|
||||||
border: 1px solid black;
|
background-color: #2563eb;
|
||||||
border-radius: 5px;
|
color: white;
|
||||||
background-color: white;
|
font-size: 18px;
|
||||||
color: black;
|
padding: 16px 24px;
|
||||||
font-size: small;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
Loading…
Reference in New Issue