by Anonymous » 02 Apr 2025, 01:35
Ich habe einen Internetladen und möchte ein modales Popup hinzufügen, wenn sie über Beschreibung schweben.
Code: Select all
p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
Hier ist meine Struktur in Blade.file und Stile, die ich ausprobiert habe
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 }}
Hier ist ein Bild mit Ergebnis
Ich möchte,>
Ich habe einen Internetladen und möchte ein modales Popup hinzufügen, wenn sie über Beschreibung schweben.[code]p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
[/code]
Hier ist meine Struktur in Blade.file und Stile, die ich ausprobiert habe
[code].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 }}
[/code]
Hier ist ein Bild mit Ergebnis
Ich möchte,>