|
Mit diesen JavaSctipt kann man einen Text, wie durch eine Lupe betrachten.
Autor: unbekannt
zur Demo
in <head> einfügen
<style type="text/css">
span {font-size: x-small}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function convertPreBlocks() {}
var regular = "x-small";
function bigger(thing){
thing.style.fontSize = "large";
siblingElement = thing.previousSibling;
while(siblingElement) {
if(siblingElement.tagName=="SPAN") {
siblingElement.style.fontSize = "medium";
break;
}
siblingElement = siblingElement.previousSibling;
}
siblingElement = thing.nextSibling;
while(siblingElement) {
if(siblingElement.tagName=="SPAN") {
siblingElement.style.fontSize = "medium";
break;
}
siblingElement = siblingElement.nextSibling;
}
}
function normal(thing){
thing.style.fontSize = regular;
siblingElement = thing.previousSibling;
while(siblingElement) {
if(siblingElement.tagName=="SPAN") {
siblingElement.style.fontSize = regular;
break;
}
siblingElement = siblingElement.previousSibling;
}
siblingElement = thing.nextSibling;
while(siblingElement) {
if(siblingElement.tagName=="SPAN") {
siblingElement.style.fontSize = regular;
break;
}
siblingElement = siblingElement.nextSibling;
}
}
// End -->
</script>
in <body> einfügen
<span onmouseover="bigger(this)" onmouseout="normal(this)">Manchmal gibt kliene Schrift</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">mit so einer Lupe</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">einen tollen</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">Effekt!</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">nicht immer</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">muss man Text groß schreiben</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">um ihn visuell</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">hervorzuheben</span><br>
<span onmouseover="bigger(this)" onmouseout="normal(this)">scriptwelt.org</span><br>
|