[HTML/CSS] 중급모듈(3)
[HTML/CSS All-in-one : 기초부터 Bootstrap, SASS, 고급 animation 까지] codingapple.com
[HTML/CSS] 중급모듈(3)
Portfolio 실습 1 : Landing Page
img1
img2
img3
img4
portfolio1.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
<div class="container"> <header> <div class="header__intro"> <h2>Landing Page for Apps</h2> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit.<br> laborum modi amet architecto ab, facilis omnis vitae.</p> <button class="btn--gray">Show more</button> </div> <div class="header__iphon"> <img src="img/porfolio1/iphone.png"> </div> </header> <section class="main__intro"> <div> <h5>It is perfect theme for your next Project!</h5> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p> <button class="btn--gray">Show Portfolio</button> </div> </section> <section class="main__service"> <p>services</p> <h5>What We Offer</h3> <div class="service__item"> <div> <i class="fa-solid fa-mobile-screen-button"></i> <h6>Reponsive</h6> <p>Lorem ipsum dolor sit amet</p> </div> <div> <i class="fa-solid fa-flask"></i> <h6>Reponsive</h6> <p>Lorem ipsum dolor sit amet</p> </div> <div> <i class="fa-solid fa-bolt-lightning"></i> <h6>Reponsive</h6> <p>Lorem ipsum dolor sit amet</p> </div> <div> <i class="fa-solid fa-earth-asia"></i> <h6>Reponsive</h6> <p>Lorem ipsum dolor sit amet</p> </div> </div> </section> <section class="main__image"> <p>portfoilo</p> <h5>What We can DO</h3> <div class="image__card"> <div> <div class="whitebox"></div> <div class="overlay image--1"> <h5>Stationary</h5> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. laborum modi amet architecto ab.</p> </div> <img src="img/porfolio1/portfolio-1.jpg"> </div> <div> <div class="whitebox"></div> <div class="overlay"> <h5>Stationary</h5> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. laborum modi amet architecto ab.</p> </div> <img src="img/porfolio1/portfolio-2.jpg"> </div> <div> <div class="whitebox"></div> <div class="overlay"> <h5>Stationary</h5> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. laborum modi amet architecto ab.</p> </div> <img src="img/porfolio1/portfolio-3.jpg"> </div> <div> <div class="whitebox"></div> <div class="overlay"> <h5>Stationary</h5> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. laborum modi amet architecto ab.</p> </div> <img src="img/porfolio1/portfolio-4.jpg"> </div> </div> </section> <footer> <div> <a href="https://www.google.com/"><i class="fa-brands fa-google"></i></a> <a href="https://x.com/"><i class="fa-brands fa-x-twitter"></i></a> <a href="https://www.instagram.com/"><i class="fa-brands fa-instagram"></i></a> </div> <p>writing cheonseolmo, ⓒcodingapple</p> </footer> </div>
portfolio1.css
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
body { margin: 0px; } div, header, section, footer, i { box-sizing: border-box; } .container { width: 750px; margin: auto; } h5, h6, p { margin: 0px; } /* header */ header { width:100%; height: 300px; background: linear-gradient(rgb(132, 211, 245), rgb(68, 107, 236)); display: flex; padding-left: 80px; padding-right: 60px; padding-top: 20px; } .header__intro { width: 70%; color: white; font-size: 9px; } .header__iphon { width: 30%; position: relative; } .header__iphon img { bottom: 0px; width: 100%; margin-right: 100px; position: absolute; bottom: 0px; } .btn--gray { font-size: 9px; color: white; background-color: rgb(77, 77, 77); border: none; padding: 8px; border-radius: 4px; margin-top: 10px; } .btn--gray:hover { background-color: aliceblue; color: rgb(68, 107, 236); cursor: pointer; } /* main__intro */ .main__intro { height: 150px; text-align: center; padding: 30px; } .main__intro p { margin-top: 10px; font-size: 10px; } /* main__service */ .main__service { width: 100%; text-align: center; padding: 50px; padding-left: 80px; padding-right: 80px; color: white; background-color: rgb(68, 107, 236); justify-self: center; } .main__service p { font-size: 10px; } .service__item { margin-top: 20px; text-align: center; display: flex; } .service__item div { width: 25%; } .service__item i { font-size: 20px; color: rgb(68, 107, 236); background-color: white; width: 50px; height: 50px; padding-top: 15px; margin: 10px; border-radius: 50%; } /* main_image */ .whitebox { width: 100%; height: 100%; position: absolute; z-index: 1; box-sizing: border-box; transition: all 0.5s; } .whitebox:hover { border: 15px solid rgb(255, 255, 255); } .main__image { width: 100%; text-align: center; padding-top: 50px; } .main__image p { font-size: 10px; } .main__image h5 { margin-bottom: 20px; } .image__card { width: 80%; margin: auto; background-color: black; display: flex; flex-wrap: wrap; } .image__card>div { position: relative; width: 50% } .image__card>div>img { width: 100%; display: block; } .overlay { position: absolute; padding: 30px; text-align: left; color: white; } .image--1 { background-color: rgba(0, 0, 0, 0.3); width: 100%; height: 100%; } /* footer */ footer { margin: 50px; text-align: center; } footer i { font-size: 15px; color: rgb(255, 255, 255); background-color: rgb(68, 107, 236); width: 40px; height: 40px; padding-top: 13px; margin: 10px; border-radius: 50%; } footer p { margin: 10px; font-size: 10px; } /* mobile */ @media screen and (max-width: 768px) { /* header */ header { display: grid; text-align: center; } .header__intro { width: 97%; } .header__iphon img { width: 80%; margin-left: 70%; } /* main__service */ .service__item { flex-wrap: wrap; justify-content: center; max-width: 300px; margin: 20px auto; } .service__item div { width: 50%; } /* main_image */ .image__card { width: 40%; } .image__card>div { width: 100% } }
This post is licensed under CC BY 4.0 by the author.