Einzelnen Beitrag anzeigen
  #9 (permalink)  
Alt 19.11.2005, 19:01
ulle ulle ist offline
Erfahrener Benutzer
XHTMLforum-Kenner
Thread-Ersteller
 
Registriert seit: 02.06.2003
Beiträge: 2.441
ulle befindet sich auf einem aufstrebenden Ast
Standard

Da ja meine 'schlauer' :focus Trick nur eine Halbwertszeit bis zum FF 1.5 besitzt muß eine andere Lösung her, natütlich ohne JavaScript.
Da ich ja oben das Ankerziel mit einem Event beeindrucken wollte, und dieses Verlangen wohl auch schon andere umtrieb, hat das W3C schon vorgedacht - siehe CSS 3 :P

Ziel => target (engl.)

The target pseudo-class :target

Zitat:
Zitat von w3c CSS3
Some URIs refer to a location within a resource. This kind of URI ends with a "number sign" (#) followed by an anchor identifier (called the fragment identifier).

URIs with fragment identifiers link to a certain element within the document, known as the target element. For instance, here is a URI pointing to an anchor named section_2 in a HTML document:

http://example.com/html/top.html#section_2A target element can be represented by the :target pseudo-class:

p.note:targetrepresents a p of class note that is the target element of the referring URI.

CSS example of use of the :target pseudo-class:
*:target { color : red }

*:target::before { content : url(target.png) }
Weiß jemand was diese doppelten Doppelpunkte zu bedeuten haben?

Übrigens funktioniert :target nicht nur mit Ankern, es lassen sich auch andere Elemente mit ID verändern. So zumindest meine ersten Tests.


_____________

FF 1.07 kann die Pseudo-Class deklarieren/umsetzen. Ich hoffe der FF 1.5 auch.

Code:
/* change */

a
			{
			background:	#FFF6F6;
			}
a:target
			{
			background:	#00CCCC;
			}
__________________
</ulle>
Mit Zitat antworten
Sponsored Links