zweitaccount
Dabei seit: 25.01.2008
Ort: -
Alter: -
Geschlecht: -
|
Verfasst Di 08.04.2008 15:49
Titel
|
|
|
Man kann das Spiel aber auch noch weitertreiben
falls mans ernst meint, zB. so:
Code: | <html>
<head>
<title>CSS Erben</title>
<style type="text/css">
<!--
A {
color:red;
}
A.theLink {
color:blue;
}
A#theLinkId.theLink {
color:green;
}
DIV.theDiv A {
color:yellow;
}
DIV.theDiv A.theLink {
color:purple;
}
DIV.theDiv A#theLinkId.theLink {
color:pink;
}
DIV#theDivId.theDiv A {
color:cyan;
}
DIV#theDivId.theDiv A:hover {
color:brown;
}
DIV#theDivId.theDiv A.theLink {
color:brown;
}
DIV#theDivId.theDiv A.theLink:hover {
color:red;
font-size:2em;
}
DIV#theDivId.theDiv A#theLinkId.theLink {
color:grey;
}
DIV#theDivId.theDiv A#theLinkId.theLink:hover {
color:grey;
font-style:italic;
}
.iAmBold {
font-weight:bold;
}
-->
</style>
</head>
<body>
<a href="#">Ein Link</a><br />
<a href="#" class="theLink">Ein Link mit der class 'theLink'</a><br />
<a href="#" class="theLink" id="theLinkId">Ein Link mit der class 'theLink' und der Id 'theLinkId'</a>
<div class="theDiv">
<a href="#">Ein Link innerhalb vom DIV mit der class 'theDiv'</a><br />
<a href="#" class="theLink iAmBold">Ein Link mit der class 'theLink' und 'iAmBold' innerhalb vom DIV mit der Class 'theDiv'</a><br />
<a href="#" class="theLink" id="theLinkId">Ein Link mit der class 'theLink' und der Id 'theLinkId' innerhalb vom DIV mit der class 'theDiv'</a>
</div>
<div class="theDiv" id="theDivId">
<a href="#">Ein Link innerhalb vom DIV mit der class 'theDiv' und id 'theDivId'</a><br />
<a href="#" class="theLink">Ein Link mit der class 'theLink' innerhalb vom DIV mit der class 'theDiv' und id 'theDivId'</a><br />
<a href="#" class="theLink" id="theLinkId">Ein Link mit der Class 'theLink' und der Id 'theLinkId' innerhalb vom DIV mit der class 'theDiv' und id 'theDivId'</a>
</div>
</body>
</html>
|
// edit: dazu dann noch mit :hover die sich gegenseitig ergänzen
Zuletzt bearbeitet von zweitaccount am Di 08.04.2008 15:56, insgesamt 1-mal bearbeitet
|
|