어떻게 만들지: 개인 프로필 카드

CSS를 사용하여 개인 프로필 카드를 만들어 보세요.

빌 게이츠
빌 게이츠

CEO & Founder, Example

하버드 대학교

직접 시도해 보세요

개인 프로필 카드 만들기

첫 번째 단계 - 추가 HTML:

<!-- 아이콘 라이브러리 추가 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="card">
  <img src="img.jpg" alt="John" style="width:100%">
  <h1>빌 게이츠</h1>
  <p class="title">CEO & Founder, 예시</p>
  <p>하버드 대학교</p>
  <a href="#"><i class="fa fa-dribbble"></i></a>
  <a href="#"><i class="fa fa-twitter"></i></a>
  <a href="#"><i class="fa fa-linkedin"></i></a>
  <a href="#"><i class="fa fa-facebook"></i></a>
  <p><button>연락처</button></p>
</div>

第二步 - 추가 CSS:

.card {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  max-width: 300px;
  margin: auto;
  text-align: center;
}
.title {
  color: grey;
  font-size: 18px;
}
button {
  border: none;
  outline: 0;
  display: inline-block;
  padding: 8px;
  color: white;
  background-color: #000;
  text-align: center;
  cursor: pointer;
  width: 100%;
  font-size: 18px;
}
a {
  text-decoration: none;
  font-size: 22px;
  color: black;
}
button:hover, a:hover {
  빛빛나게: 0.7;
}

직접 시도해 보세요