Vorlage:LandingPage/ImageCard/styles.css: Unterschied zwischen den Versionen

Aus Stadtsprachen
Wechseln zu:Navigation, Suche
Die Seite wurde neu angelegt: „.image-overlay-container { position: relative; display: inline-block; Or block, depending on layout: } .image-overlay-image { display: block; } .image-overlay-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: rgba(0, 0, 0, 0.6); Semi-transparent background: color: white; padding: 10px; text-align: center; width: 90%; box-sizing: border-box; } .zoom { transition: t…“
 
Keine Bearbeitungszusammenfassung
 
(4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
.image-overlay-container {
.image-card {
  display: flex;
  flex-direction: column;
  height: 80vh; /* Approximate height */
   position: relative;
   position: relative;
   display: inline-block; /* Or block, depending on layout */
   overflow: hidden;
  border-radius: 0.5rem; /* rounded-lg */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-lg */
  text-decoration: none; /* remove underline from link */
}
}


.image-overlay-image {
.image-card-image img {
   display: block;
   position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.2s ease-in-out;
}
 
.image-card:hover .image-card-image img {
  transform: scale(1.1);
}
}


.image-overlay-text {
.image-card-overlay {
   position: absolute;
   position: absolute;
   top: 50%;
   inset: 0;
   left: 50%;
   background-color: #343a40; /* bg-dark */
  transform: translate(-50%, -50%);
   opacity: 0.7; /* opacity-7 */
   background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
}
   color: white;
 
   padding: 10px;
.image-card-text {
   text-align: center;
  position: relative;
   width: 90%;
  display: flex;
   box-sizing: border-box;
  flex-direction: column;
   align-items: center; /* Center text horizontally */
   justify-content: center; /* Center text vertically */
   text-align: center; /* Ensure text is centered */
   padding: 1rem; /* Add some padding */
   width: 100%; /* Ensure text takes full width */
}
}


.zoom {
.image-card-text span:first-child {
    transition: transform 0.3s ease; /* Add transition for smooth zoom */
  font-size: 1.125rem; /* text-lg */
  font-weight: 600; /* font-semibold */
  color: white; /* text-white */
}
}


.zoom:hover {
.image-card-text span:last-child {
    transform: scale(1.1); /* Zoom on hover */
  font-size: 0.875rem; /* text-sm */
  color: #d1d5db; /* text-gray-300 */
}
}

Aktuelle Version vom 27. Februar 2025, 11:46 Uhr

.image-card {
  display: flex;
  flex-direction: column;
  height: 80vh; /* Approximate height */
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem; /* rounded-lg */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-lg */
  text-decoration: none; /* remove underline from link */
}

.image-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.2s ease-in-out;
}

.image-card:hover .image-card-image img {
  transform: scale(1.1);
}

.image-card-overlay {
  position: absolute;
  inset: 0;
  background-color: #343a40; /* bg-dark */
  opacity: 0.7; /* opacity-7 */
}

.image-card-text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center text horizontally */
  justify-content: center; /* Center text vertically */
  text-align: center; /* Ensure text is centered */
  padding: 1rem; /* Add some padding */
  width: 100%; /* Ensure text takes full width */
}

.image-card-text span:first-child {
  font-size: 1.125rem; /* text-lg */
  font-weight: 600; /* font-semibold */
  color: white; /* text-white */
}

.image-card-text span:last-child {
  font-size: 0.875rem; /* text-sm */
  color: #d1d5db; /* text-gray-300 */
}