Asset-Borrowing-Website / public / css / role_page.css
role_page.css
Raw
.body {
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)),
    url(/public/img/gg.png);
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  background-size: cover;
  /* -webkit-background-size: 100% 100%;
  -moz-background-size: 100% 100%;
  -o-background-size: 100% 100%;
  background-size: 100% 100%; */
}

.bg {
  border-radius: 50px;
  padding: 50px;
  background-color: #333;
  box-shadow: 10px 10px 15px 10px rgba(0, 0, 0, 0.3);
}

.container {
  text-align:center;
  color:white;
  font-family: 'Source Code Pro', monospace;
  text-transform:uppercase;
}

/* .center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-items: center;
  height: 100vh;
} */

.text-large {
  font-size: 60px;
  font-weight: bold;
  color: white;
  margin-bottom: 2%;
}


/* .profile {
  margin-left: 80px;
  margin-right: 80px;
  margin-top: 50px;
  margin-bottom: 30px;
  padding: 30px;
} */

/* .card {
  background-color: #343a40;
} */

/* .card:hover {
  background-color: gray;
  border-radius: 50px;
} */

.textName {
  color: white;
}

:root {
  --card-height: 300px;
  --card-width: calc(var(--card-height) / 1.5);
}
* {
  box-sizing: border-box;
}
body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #333;
}
.card {
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  border: none;
  /* padding: 0 36px; */
  perspective: 2500px;
  /* margin: 50px; */
  margin-left: 80px;
  background-color: #333;
}

.cover-image {
  width: 100%;
  height: 100%;
  /* object-fit: cover; */
  /* color: white; */
  /* background-color: white; */
}

.wrapper {
  transition: all 0.5s;
  position: absolute;
  width: 100%;
  z-index: -1;
}

.card:hover .wrapper {
  transform: perspective(900px) translateY(-5%) rotateX(25deg) translateZ(0);
  box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
  -webkit-box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
}

.wrapper::before,
.wrapper::after {
  content: "";
  opacity: 0;
  width: 100%;
  height: 80px;
  transition: all 0.5s;
  position: absolute;
  left: 0;
}
.wrapper::before {
  top: 0;
  height: 100%;
  background-image: linear-gradient(
    to top,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}
.wrapper::after {
  bottom: 0;
  opacity: 1;
  background-image: linear-gradient(
    to bottom,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}

.card:hover .wrapper::before,
.wrapper::after {
  opacity: 1;
}

.card:hover .wrapper::after {
  height: 120px;
}
.title {
  width: 100%;
  transition: transform 0.5s;
  align-items: center;
  text-align: center;
  position: absolute;
  bottom: 0;
  z-index: 1; /* ปรับ z-index ตามต้องการ */
  color: white;
}

.card:hover .title {
  transform: translate3d(0%, 0, 100px); /* เพื่อไม่ให้ .title ขึ้นเวลา hover */
}

.character {
  width: 100%;
  opacity: 0;
  transition: all 0.5s;
  position: absolute;
  z-index: -1;
}

.card:hover .character {
  opacity: 1;
  transform: translate3d(0%, -30%, 100px);
}