styles.css

Aus Infopedia
Wechseln zu:Navigation, Suche
Zeile 1: Zeile 1:
 
.flip-card {
 
.flip-card {
  perspective: 40rem;
 
 
   padding: 10px;
 
   padding: 10px;
 
   text-decoration: none;
 
   text-decoration: none;
Zeile 22: Zeile 21:
 
.flip-card.hasHover:hover .flip-card-inner, .flip-card:focus .flip-card-inner, .flip-card.touchDevice-hovered .flip-card-inner {
 
.flip-card.hasHover:hover .flip-card-inner, .flip-card:focus .flip-card-inner, .flip-card.touchDevice-hovered .flip-card-inner {
 
   transform: rotateY(-180deg);
 
   transform: rotateY(-180deg);
 +
  -webkit-user-select: none;  /* Webkit */
 +
  -moz-user-select: none;      /* Firefox */
 +
  -ms-user-select: none;      /* Edge*/
 +
  user-select: none;      /* Future-proof*/
 
}
 
}
  

Version vom 4. November 2021, 21:54 Uhr

.flip-card {
  padding: 10px;
  text-decoration: none;
}
.flip-card-inner {
  display: flex;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  border-radius: 0.25rem;
  flex: 1;
  width: 250px;
  height: 250px;
  margin: auto;
  text-align: center;
  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);
}

.flip-card:active {
  transform: scale(0.975);
}
.flip-card.hasHover:hover .flip-card-inner, .flip-card:focus .flip-card-inner, .flip-card.touchDevice-hovered .flip-card-inner {
  transform: rotateY(-180deg);
  -webkit-user-select: none;   /* Webkit */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Edge*/
  user-select: none;       /* Future-proof*/
}

.flip-card-front, .flip-card-back {
  backface-visibility: hidden;
  min-width: 100%;
  display: flex;
  align-items: center;
  background-color: white;
  box-sizing: border-box;
  border-radius: 0.25rem;
}
.flip-card-front {
  color: black;
}
.flip-card-back {
  color: black;
  transform: rotateY(180deg) translateX(250px);
}