CSS Text Selection Color

css textselection

Wenn man normalerweise einen Text auf einer Website markiert, wird er meist mit weißer Schrift auf dunkelblauen Hintergrund angezeigt. Möchte man aber vielleicht eine schönere Farbe haben, kann man hierfür das CSS3 pseudo Element ::selection verwenden. Unterstützt wird dies derzeit allerdings nur von Safari, Konquerer und Firefox (mit moz- prefix).

The CSS Code

::selection {background: #FFCACA; color: #222;}
::-moz-selection {background:#FFCACA; color: #222;}

Example (firefox, safari, konquerer only)

Mark me, i'm a normal text with normal darkblue color :( ....

Mark me, i'm a beautiful text with a nice background-color :) ....


 

0 Kommentare »

Noch keine Kommentare :(
Kommentar schreiben

(erforderlich)

(required but will not be published)

(if you have one)

Bild einfügen:<img src="http://www.website.com/meinbild.jpg" alt="bildbeschreibung" />

 
Produced and © by Koller Jürgen | Powered by the awesome WP | Love and Joy to everyone