Skip to content

Commit

Permalink
Merge pull request bradtraversy#71 from khatri2002/animated-countdown…
Browse files Browse the repository at this point in the history
…-style

Added CSS style to button
  • Loading branch information
bradtraversy authored Jul 31, 2021
2 parents f1d4761 + 3011f42 commit 9f05b92
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
4 changes: 3 additions & 1 deletion animated-countdown/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ <h4>Get Ready</h4>

<div class="final">
<h1>GO</h1>
<button id="replay">Replay</button>
<button id="replay">
<span>Replay</span>
</button>
</div>
<script src="script.js"></script>
</body>
Expand Down
37 changes: 37 additions & 0 deletions animated-countdown/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,40 @@ h4 {
transform: translate(-50%, -50%) rotate(-120deg);
}
}

#replay{
background-color: #3498db;
border-radius: 3px;
border: none;
color: aliceblue;
padding: 5px;
text-align: center;
display: inline-block;
cursor: pointer;
transition: all 0.3s;
}

#replay span{
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.3s;
}

#replay span:after{
content: '\00bb';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}

#replay:hover span{
padding-right: 25px;
}

#replay:hover span:after{
opacity: 1;
right: 0;
}

0 comments on commit 9f05b92

Please sign in to comment.