Below is a CSS Javascript that I found very useful to my website.
It adds a 'fisheye' effect to your text.
Move your mouse over the text and watch it change from big to small.
It's implemented using JavaScript and CSS.
CSS: Fisheye
This code is divided into TWO parts. The following part is to be copied into the HEAD of the HTML document.
The next part, is to be copied into the BODY of the HTML document.
*** Please edit the words accordingly. ***
===== For any questions, please reply to this post. Thanks. =====
It adds a 'fisheye' effect to your text.
Move your mouse over the text and watch it change from big to small.
It's implemented using JavaScript and CSS.
CSS: Fisheye
This code is divided into TWO parts. The following part is to be copied into the HEAD of the HTML document.
| Code: |
| <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> |
The next part, is to be copied into the BODY of the HTML document.
| Code: |
| The Geek's Raven<br />
[An excerpt, with thanks to Marcus Bales] <br /><br /> <span onmouseover="bigger(this)" onmouseout="normal(this)">Once upon a midnight dreary,</span><br/> <span onmouseover="bigger(this)" onmouseout="normal(this)">fingers cramped and vision bleary,</span><br/> <span onmouseover="bigger(this)" onmouseout="normal(this)">System manuals piled high and wasted paper on the floor,</span><br/> <span onmouseover="bigger(this)" onmouseout="normal(this)">Longing for the warmth of bedsheets,</span><br/> <span onmouseover="bigger(this)" onmouseout="normal(this)">Still I sat there, doing spreadsheets:</span><br/> <span onmouseover="bigger(this)" onmouseout="normal(this)">Having reached the bottom line,</span><br/> <span onmouseover="bigger(this)" onmouseout="normal(this)">I took a floppy from the drawer.</span><br/> <span onmouseover="bigger(this)" onmouseout="normal(this)">Typing with a steady hand, I then invoked the SAVE command</span><br/> <span onmouseover="bigger(this)" onmouseout="normal(this)">But got instead a reprimand: it read "Abort, Retry, Ignore".</span><br/> |
*** Please edit the words accordingly. ***
===== For any questions, please reply to this post. Thanks. =====
