Skip to content

Instantly share code, notes, and snippets.

@macchiitaka
Created July 13, 2024 08:55
Show Gist options
  • Select an option

  • Save macchiitaka/2847646e8b4a5d3039afa0d2bca6277b to your computer and use it in GitHub Desktop.

Select an option

Save macchiitaka/2847646e8b4a5d3039afa0d2bca6277b to your computer and use it in GitHub Desktop.
@starting-style sample
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>@starting-style</title>
<style>
body,
h1 {
margin: 0;
}
#container {
display: grid;
width: 100vw;
height: 100dvh;
place-items: center;
transition: background-color 1.5s;
background-color: black;
}
#title {
transition: all 1.5s;
color: white;
translate: 0;
}
@starting-style {
#container {
background-color: white;
}
#title {
opacity: 0;
translate: 100px 0;
color: black;
}
}
</style>
</head>
<body>
<main id="container">
<h1 id="title">@starting-style</h1>
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment