You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
793 B
48 lines
793 B
4 years ago
|
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
|
||
|
|
||
|
* {
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
body {
|
||
|
background-color: #efedd6;
|
||
|
font-family: 'Roboto', sans-serif;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
margin: 0;
|
||
|
overflow-x: hidden;
|
||
|
}
|
||
|
|
||
|
h1 {
|
||
|
margin: 10px;
|
||
|
}
|
||
|
|
||
|
.box {
|
||
|
background-color: steelblue;
|
||
|
color: #fff;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
width: 400px;
|
||
|
height: 200px;
|
||
|
margin: 10px;
|
||
|
border-radius: 10px;
|
||
|
box-shadow: 2px 4px 5px rgba(0, 0, 0, 0.3);
|
||
|
transform: translateX(400%);
|
||
|
transition: transform 0.4s ease;
|
||
|
}
|
||
|
|
||
|
.box:nth-of-type(even) {
|
||
|
transform: translateX(-400%);
|
||
|
}
|
||
|
|
||
|
.box.show {
|
||
|
transform: translateX(0);
|
||
|
}
|
||
|
|
||
|
.box h2 {
|
||
|
font-size: 45px;
|
||
|
}
|