|
| 1 | +@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@300;400&display=swap"); |
| 2 | + |
| 3 | +:root { |
| 4 | + --main-color: #42515c; |
| 5 | + --text-color: #ecebf4; |
| 6 | + --dark-text-color: #293842; |
| 7 | +} |
| 8 | + |
| 9 | +* { |
| 10 | + box-sizing: border-box; |
| 11 | + margin: 0; |
| 12 | + padding: 0; |
| 13 | +} |
| 14 | + |
| 15 | +body { |
| 16 | + background-color: var(--main-color); |
| 17 | + color: var(--text-color); |
| 18 | + font-family: "Nunito", sans-serif; |
| 19 | + min-height: 100vh; |
| 20 | +} |
| 21 | + |
| 22 | +h2 { |
| 23 | + font-size: 2.75rem; |
| 24 | + font-weight: 300; |
| 25 | + margin: 0.625rem; |
| 26 | +} |
| 27 | + |
| 28 | +h2 span { |
| 29 | + font-size: 2rem; |
| 30 | +} |
| 31 | + |
| 32 | +p { |
| 33 | + font-size: 1.25rem; |
| 34 | +} |
| 35 | + |
| 36 | +.container { |
| 37 | + display: grid; |
| 38 | + grid-template-columns: 1fr 1fr; |
| 39 | + gap: 10px; |
| 40 | +} |
| 41 | + |
| 42 | +.container > div { |
| 43 | + cursor: pointer; |
| 44 | + height: 210px; |
| 45 | + background-size: cover; |
| 46 | + background-attachment: fixed; |
| 47 | + display: flex; |
| 48 | + flex-direction: column; |
| 49 | + justify-content: center; |
| 50 | + align-items: center; |
| 51 | + text-align: center; |
| 52 | + transition: all 0.5s ease-out; |
| 53 | +} |
| 54 | + |
| 55 | +.container > div:hover { |
| 56 | + opacity: 0.7; |
| 57 | + transform: scale(0.98); |
| 58 | +} |
| 59 | + |
| 60 | +.bg1 { |
| 61 | + background-image: url("https://images.unsplash.com/photo-1599447333424-272c8fa5466f?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80"); |
| 62 | + text-shadow: 1px 1px 2px var(--main-color); |
| 63 | +} |
| 64 | + |
| 65 | +.bg2 { |
| 66 | + background-image: url("https://images.unsplash.com/photo-1461468611824-46457c0e11fd?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80"); |
| 67 | + color: var(--dark-text-color); |
| 68 | + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); |
| 69 | +} |
| 70 | + |
| 71 | +.container > div:first-of-type, |
| 72 | +.container > div:nth-of-type(6), |
| 73 | +.container > div:nth-of-type(9), |
| 74 | +.container > div:nth-of-type(10) { |
| 75 | + grid-column: span 2; |
| 76 | +} |
| 77 | + |
| 78 | +@media (min-width: 768px) { |
| 79 | + .container { |
| 80 | + grid-template-columns: repeat(4, 1fr); |
| 81 | + } |
| 82 | +} |
0 commit comments