styles.css

Aus Infopedia
Wechseln zu:Navigation, Suche
Zeile 1: Zeile 1:
.flipcard:hover .flipcard-body, .flipcard:focus .flipcard-body {
+
.flip-card {
transform: rotateY(-180deg);
+
  background-color: transparent;
 +
  width: 250px;
 +
  height: 250px;
 +
  perspective: 1000px;
 
}
 
}
  
.flipcard-back {
+
.flip-card-inner {
transform: rotateY(-180deg);
+
  position: relative;
 
+
  width: 100%;
}
+
  height: 100%;
 
+
  text-align: center;
.flipcard {
+
  transition: transform 0.6s;
perspective: 40rem;
+
  transform-style: preserve-3d;
transition: z-index, transform 0.2s;
+
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition-delay: 0.7s, 0s;
 
z-index: 0;
 
  padding: 10px;
 
  text-decoration: none;
 
}
 
 
 
.flipcard:hover {
 
transition-delay: 0s;
 
z-index: 1;
 
 
}
 
}
  
.flipcard:active {
+
.flip-card:hover .flip-card-inner {
transform: scale(0.975);
+
  transform: rotateY(180deg);
 
}
 
}
  
.flipcard-body {
+
.flip-card-front, .flip-card-back {
display: flex;
+
  position: absolute;
transform-style: preserve-3d;
+
  width: 100%;
transition: 0.7s transform;
+
  height: 100%;
border-radius: 0.25rem;
+
  backface-visibility: hidden;
flex: 1;
 
  width: 250px;
 
  height: 250px;
 
  margin: auto;
 
 
}
 
}
  
.flipcard-front, .flipcard-back {
+
.flip-card-front {
backface-visibility: hidden;
+
  background-color: #bbb;
min-width: 100%;
+
  color: black;
display: flex;
 
align-items: center;
 
background-color: white;
 
box-sizing: border-box;
 
border-radius: 0.25rem;
 
 
}
 
}
  
.shadow, .flipcard-front, .flipcard-back {
+
.flip-card-back {
box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.04), 0 2px 2px rgba(0, 0, 0, 0.04), 0 4px 4px rgba(0, 0, 0, 0.04), 0 8px 8px rgba(0, 0, 0, 0.04), 0 16px 16px rgba(0, 0, 0, 0.04);
+
  background-color: #2980b9;
 +
  color: white;
 +
  transform: rotateY(180deg);
 
}
 
}

Version vom 3. März 2021, 22:16 Uhr

.flip-card {
  background-color: transparent;
  width: 250px;
  height: 250px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-card-front {
  background-color: #bbb;
  color: black;
}

.flip-card-back {
  background-color: #2980b9;
  color: white;
  transform: rotateY(180deg);
}