|
|||
Button Text underline effect funktioniert nicht im Firefox
Hallo Leute,
hab einen Button mit Text, dieser Text soll einen "underline Effekt" haben. Die Animation funktioniert aber nur im Google Chrome und im Firefox nicht. Könnte mir vielleicht jemand sagen was ich hier ändern muss? Habe auf jsfiddle ein Beispiel erstellt. https://jsfiddle.net/rb0ydL3q/4/ LG Geändert von Smoke (23.07.2018 um 20:56 Uhr) |
Sponsored Links |
|
|||
In deinem Beispiel sehe ich nur 'text-decoration: none;'... setze mal im CSS
HTML-Code:
button:hover span.underline { text-decoration: underline; } |
Sponsored Links |
|
|||
Hab doch die Url vom jsfiddle gepostet ?
CSS Code:
.inquiry-button { font-family: 'Playfair Display', Helvetica, Arial, sans-serif; cursor: pointer; pointer-events: auto; padding: .9375em 2.25em; background-color: #fbe6c8; border: 1px solid #4d4d4d !important; outline: none; text-transform: uppercase; margin-top: 30px; display: block; margin: 0 auto; } .underline { position: relative; color: #4d4d4d; text-decoration: none; } .underline:hover { color: #4d4d4d; } .underline:before { display: inline-block; content: ""; position: absolute; width: 0%; left: 0; bottom: 0; border-bottom: 1px solid #4d4d4d; -webkit-transition: all 0.4s ease-in; -moz-transition: all 0.4s ease-in; -o-transition: all 0.4s ease-in; transition: all 0.4s ease-in; } .underline:hover:before { width: 100%; } button:hover span.underline { text-decoration: underline; } HTML-Code:
<button class="inquiry-button" type="submit"> <span class="underline">Anfrage</span> </button> |
|
|||
Bei mir funktioniert es... hast du mal den Browser Cache geleert?
... oder soll der Unterstrich auch bei nicht 'hover' zu sehen sein. Dann musst du ... HTML-Code:
button span.underline { text-decoration: underline; } |
|
|||
Cache wurde geleert, funktioniert trotzdem nicht. Nein, der underline soll nicht angezeigt werden, ohne hover. Ich versteh das nicht....
Kannst du mir vielleicht das verbesserte jsfiddle posten? |
|
|||
Hab in deinem CSS mal alle Selektoren auf 'button .underline' ergänzt...
HTML-Code:
.inquiry-button { font-family: 'Playfair Display', Helvetica, Arial, sans-serif; cursor: pointer; pointer-events: auto; padding: .9375em 2.25em; background-color: #fbe6c8; border: 1px solid #4d4d4d !important; outline: none; text-transform: uppercase; margin-top: 30px; display: block; margin: 0 auto; } button .underline { position: relative; color: #4d4d4d; text-decoration: none; } button .underline:hover { color: #4d4d4d; } button .underline::before { display: inline-block; content: ""; position: absolute; width: 0%; left: 0; bottom: 0; border-bottom: 1px solid #4d4d4d; -webkit-transition: all 0.4s ease-in; -moz-transition: all 0.4s ease-in; -o-transition: all 0.4s ease-in; transition: all 0.4s ease-in; } button:hover .underline::before { width: 100%; } button:hover span.underline { text-decoration: underline; } |
|
|||
Der hover effekt funktioniert jetzt zwar, aber man sieht vorher noch den normal underline also den text-decoration: underline; beim hovern. Bei dir ist das nicht so? Und das ganze im Chrome und Firefox..
Edit: So funktionierts jetzt danke https://jsfiddle.net/rb0ydL3q/33/ Geändert von Smoke (23.07.2018 um 22:39 Uhr) |
Sponsored Links |
|
|||
Doch... das ist bei mir auch so.
Solltest du aber weg bekommen, wenn du im letzten CSS Eintrag das 'underline' wieder durch 'none' ersetzt. HTML-Code:
button:hover span.underline { text-decoration: none; } |
Sponsored Links |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Text-indent mit Firefox funktioniert nicht | mauk | CSS | 12 | 10.02.2006 16:45 |
Input Type=Image Button - funktioniert nirgends | dabjoern | (X)HTML | 8 | 04.11.2005 12:56 |
link funktioniert nicht im IE | ThomThom | (X)HTML | 11 | 06.05.2005 21:50 |
menu verschiebt sich im ie, funktioniert aber im FireFox | fabiO | CSS | 8 | 27.04.2005 12:12 |
css-datei funktioniert bei firefox nicht :/ | Chii | CSS | 19 | 15.07.2004 20:28 |