Monday, July 6, 2009

Your Own Code to Enlarge and Reduce HTML Images

Introduction
In this article, I exhibit you how to indite cipher that module drive an HTML ikon to large itself and drive it to turn itself to its warning size. The photo and modify takes locate where the ikon is. If you poverty to undergo how to indite cipher that module increase the ikon in a assorted locate on the scheme page, then feature my article titled Producing an Image Gallery by Hand.

You requirement base noesis in HTML, CSS and JavaScript to wager this article.

Note: If you cannot wager the cipher or if you conceive anything is abstracted in this article (broken link, ikon absent), meet occurrence me at forchatrans@yahoo.com. That is, occurrence me for the slightest difficulty you hit most what you are reading.

The Example
I module ingest a ultimate warning for illustration. In this example, you hit a DIV surroundings with book and an ikon anywhere within the text. When you utter the image, you wager the large ikon without some modify in layout (positions of HTML book and elements). When you then utter the large ikon it reduces to its warning size.

This is the code; you crapper essay it and then feature the account below:

img#I1A {width:400px; height:400px; display:none; position:absolute; z-index:2}
img#I1B {width:100px; height:100px}

var filler = "small"
function maxRest()
{
if (size == "small")
{
document.getElementById('I1A').style.display = "inline";
size = "big";
}
else
{
document.getElementById('I1A').style.display = "none";
size = "small";
}
}

text book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book! book bo ok book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book book


No comments:

Post a Comment