Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

font color in div mouseover

Empfohlene Antworten

Veröffentlicht

hi und hallo,

ich möchte gerne den sich ein einem <div> befindlichen text bei mouseover verändern. nämlich ihm eine andere farbe geben.

aber leider steh ich totally aufm schlauch wie das am besten geht.. jemand nen vorschlag???

ups das war nix.

ich muss nochmal nachhaken, denn ich hab das wichtigste vergessen:

problem an der sache ist folgendes:


<a href="#">

    <div class="navLevel1">

        TESTLINK    

    </div>

</a>

die class navLevel1 sieht so aus:

.navLevel1{

font-size: 10pt;

color: #DCDCDC;

text-transform:uppercase;

font-weight: bold;

filter:DropShadow(color=#000000, offx=1, offy=1);

width: 100%;

cursor: hand;

text-decoration: none;

}

das wichtige hierran ist der shadow.

ja, und jetzt brauch ich irgendwie ein "hover" oder in onMouseOver um die farbe des textes "TESTLINK" beim drüberfahren mit der maus zu ändern...

aber leider steh ich totally aufm schlauch wie das am besten geht.. jemand nen vorschlag???

gong! ok, guten morgen...das hätt ich mir echt sparen können. aber so bin ich halt der alleinunterhalten am heutigen samstag abend im webdesign forum ;)

natürlich muss das <a> in das div und einfach noch ne "hover" klasse für das <a> erzeugt werden. feddich...

mann mann...sorry

wenn man keine Ahnung hat,..... :)

Also nochma die Lösung für die dies Interessiert:

HTML:


<div class="class1" onMouseOver='this.class="class2";' onMouseOut='this.class="class1";'>

   Mein Testtext

</div>

CSS:

.class1 {

   font-color: #FF0000;

}


.class2 {

   font-color: #00FF00;

}

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.