오늘은 이미지 요소에 대해 알아보았습니다.

6694 단어 webdevcsslaravelhtml
여기 내 HTML 코드가 있습니다.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Hubble</title>
    <link rel="stylesheet" href="./normalize.css" />
    <link rel="stylesheet" href="./style.css" />
    <link rel="preconnect" href="https://fonts.gstatic.com" />
    <link
      href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;900&amp;display=swap"
      rel="stylesheet"
    />
  </head>
  <body>
    <section class="products">
      <h1>Hubble space telescope</h1>
      <p class="paraghraph">30 Years of Discovery</p>
    </section>
  </body>
</html>


여기 내 CSS 코드가 있습니다.

html {
  font-size: 62.5%;
}
body {
  font-family: Poppins, Arial, Helvetica, sans-serif;
}
h1 {
  font-weight: 900;
  font-size: 8rem;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
  word-spacing: 1.5rem;
}
.products {
  background: url(./jeremy-thomas-E0AHdsENmDg-unsplash\ .jpg) no-repeat;
  background-size: cover;
}

.products {
  align-items: center;
  background: url(./jeremy-thomas-E0AHdsENmDg-unsplash\ .jpg);
  background-size: cover;
  color: #fff;
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}
.products .paraghraph {
  background: rgba(0, 0, 0, 0.6);
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 1.5px;
  padding: 1.5rem;
}



다음은 출력입니다.

좋은 웹페이지 즐겨찾기