Team Card

Team card using HTML and CSS
mail@pastecode.io avatar
unknown
html
3 years ago
2.0 kB
4
Indexable
Never
<style>
@import url("https://fonts.googleapis.com/css2?family=PT+Sans&family=Staatliches&display=swap");
body {
  background-image: linear-gradient(
    180deg,
    rgb(201, 201, 201),
    rgb(226, 226, 226)
  );
}
.card-container {
  position: relative;
  margin: 10% 40%;
}

.card {
  height: 370px;
  width: 250px;
  transition: all 1s ease;
  text-align: center;
}

.card-top {
  height: 370px;
  width: 250px;
  border-radius: 10px;
  position: relative;
  background-color: white;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  z-index: 2;
  transition-duration: 500ms;
}

.card:hover .card-top {
  transform: translate(15px, -15px);

  transition-duration: 500ms;
}
.card-top > img {
  height: 150px;
  border-radius: 100px;
  margin: 20px auto 0px auto;
}
.card-top > h2 {
  font-family: "Staatliches", cursive;
}

.card-top > p {
  font-family: "PT Sans", sans-serif;
}
.card-bottom {
  position: absolute;
  height: 370px;
  width: 250px;
  top: 0;
  background-image: linear-gradient(
    180deg,
    rgb(255, 89, 89),
    rgb(255, 255, 79)
  );
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  z-index: 1;
}
a > img {
  height: 25px;
  margin: auto 10px;
  filter: grayscale(100%);
  transition-duration: 300ms;
}

a > img:hover {
  filter: grayscale(0%);
  transition-duration: 300ms;
}

</style>

<body>
    
    <div class="card-container">

        <div class="card">
                <div class="card-top"><img src="https://picsum.photos/200" alt="">
                    <h2>Member Name</h2>
                    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Voluptate, enim.</p>
                
                    <a href="#fb"><img src="fb.png" alt=""></a>
                    <a href="#fb"><img src="ig.png" alt=""></a>
                    <a href="#fb"><img src="tw.png" alt=""></a></div>
        </div>
        <div class="card-bottom"></div>
    </div>

</body>