Skip to content

Instantly share code, notes, and snippets.

@kinjouj
Created January 2, 2026 12:33
Show Gist options
  • Select an option

  • Save kinjouj/70e694c4946e361a6f889d183b684e16 to your computer and use it in GitHub Desktop.

Select an option

Save kinjouj/70e694c4946e361a6f889d183b684e16 to your computer and use it in GitHub Desktop.
<html>
<body>
<button onclick="location.hash = '#test'">click</button>
<p />
<div id="test">test</div>
<style type="text/css">
@keyframes fadeOut {
0% {
opacity: 100;
}
100% {
opacity: 0;
}
}
#test {
width: 300px;
height: 300px;
color: white;
background-color: black;
align-content: center;
text-align: center;
border: 1px solid;
border-radius: 8px;
}
#test:target {
animation-name: fadeOut;
animation-duration: 5s;
animation-timing-function: ease-in-out;
animation-fill-mode: forwards;
}
</style>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment