Webbserver - Love Blomberg

Show sourcecode

The following files exists in this folder. Click to view.

public_html/gamla-kurser/webbutv1/projekt/Cards/

cards.css
cards.html
vanilla-tilt.js
vanilla-tilt.min.js

cards.css

113 lines ASCII Windows (CRLF)
body {
  background-color: #0b0b26;
}

.container {
  display: block;
}

.card {
  float: left;
  display: grid;
  grid-template-columns: 25vw;
  grid-template-rows: 210px 250px 20px;
  grid-template-areas: "image" "text" "stats";

  border-radius: 18px;
  background: #1d1d1d;
  color: white;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.9);
  font-family: 'Montserrat', sans-serif;
  text-align: justify;
  
  cursor: pointer;
  margin:30px;

  transform-style: preserve-3d;
  transform: perspective(1000px);
}

.card:hover {
  box-shadow: 5px 5px 15px rgba(0,0,0,0.6);
}

.card-image {
  grid-area: image;
  background: linear-gradient(#fff0 0%, #fff0 70%, #1d1d1d 100%),url('https://live.staticflickr.com/1908/43096320430_75b9e98a1e_b.jpg');
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  background-size: cover;
}

.card-text {
  grid-area: text;
  margin: 25px;
  transform: translateZ(30px);
}
.card-text .date {
  color: rgb(255, 7, 110);
  font-size:13px;
}
.card-text p {
  color: grey;
  font-size:14px;
  font-weight: 300;
}
.card-text h2 {
  margin-top:0px;
  font-size:28px;
}

.card-stats {
  grid-area: stats; 
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr;

  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  background: rgb(255, 7, 110);
}

.card-stats .stat {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  color: white;
  padding:10px;
}

.js-tilt-glare {
  border-radius: 18px;
}

.rgb::after {
  content:"";
  background: linear-gradient(45deg,
  #ff0000 0%, 
  #ff9a00 10%,
  #d0de21 20%,
  #4fdc4a 30%, 
  #3fdad8 40%,
  #2fc9e2 50%, 
  #1c7fee 60%, 
  #5f15f2 70%, 
  #ba0cf8 80%, 
  #fb07d9 90%, 
  #ff0000 100%  )
  repeat 0% 0% / 300% 100%;
  position: absolute;
  inset: -3px;
  border-radius: 16px;
  filter: blur(8px);
  transform: translateZ(-1px); /*or z-index */
  animation: rgb 6s linear infinite;
}

@keyframes rgb {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}