Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Positioning elements</title>
- <link rel="stylesheet" type="text/css" href="style/style.css">
- </head>
- <body>
- <header id="showcase">
- <h1>Welcome to my site</h1>
- </header>
- <div id="content" class="container">
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- </div>
- <a href="#" class="btn">Read More</a>
- </body>
- </html>
- *{
- margin: 0;
- padding: 0;
- }
- body{
- font-family: Arial, Helvetica, sans-serif;
- background-color: #12475f;
- color: #fff;
- line-height: 1.6;
- text-align: center;
- }
- .container{
- max-width: 960px;
- margin: auto;
- padding: 0 30px;
- }
- #showcase{
- height: 300px;
- }
- #showcase h1{
- font-size: 50px;
- line-height: 1.3;
- position: relative;
- animation-name: heading;
- animation-duration: 3s;
- animation-fill-mode: forwards;
- }
- @keyframes heading{
- 0% {top: -50px;}
- 100% {top:200px;}
- }
- #content{
- position: relative;
- animation-name: content;
- animation-duration: 3s;
- animation-fill-mode: forwards;
- }
- @keyframes content {
- 0% {left: -1000px;}
- 100% {left: 0;}
- }
- .btn{
- display: inline-block;
- color:#fff;
- text-decoration: none;
- padding: 1rem 2rem;
- border:#fff 1px solid;
- margin-top: 40px;
- opacity: 0;
- animation-name: btn;
- animation-duration: 3s;
- animation-delay: 3s;
- animation-fill-mode: forwards;
- transition-property: transform;
- transition-duration: 1s;
- }
- .btn:hover{
- transform: rotateY(180deg);
- }
- @keyframes btn{
- 0% {opacity:0}
- 100%{opacity: 1}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement