Created
July 13, 2024 08:55
-
-
Save macchiitaka/2847646e8b4a5d3039afa0d2bca6277b to your computer and use it in GitHub Desktop.
@starting-style sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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