Ich möchte modales Popup auf Hover [geschlossen] machen
Posted: 02 Apr 2025, 01:35
Ich habe einen Internetladen und möchte ein modales Popup hinzufügen, wenn sie über Beschreibung schweben.
Hier ist meine Struktur in Blade.file und Stile, die ich ausprobiert habe
Hier ist ein Bild mit Ergebnis
Ich möchte,>
Code: Select all
p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
Code: Select all
.description {
position: relative;
p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.descriptionModal {
position: absolute;
top: 100%;
left: 0;
background-color: #d0d864;
padding: 10px;
width: fit-content;
max-width: 300px;
height: auto;
opacity: 0;
visibility: hidden;
transition: opacity 0.5s ease, visibility 1s ease;
z-index: 10;
white-space: normal;
/* Allow text to wrap inside the modal */
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
&:hover {
.descriptionModal {
opacity: 1;
visibility: visible;
transition-delay: 1s;
}
}
}
< /code>
{{ $product->productShortDescription }}
{{ $product->productShortDescription }}
Ich möchte,>