nfg_day3

code <!doctype html>  body{ background:#aabbcc; font-size:12px; font-family:'Verdana','Arial',sans-serif; }	a{ text-decoration:none; color:black; }
 * Ex.4**

a:hover{ text-decoration:underline; }   .button{ font-size:2em; font-weight:bold; }   .box{ width:296px; height:456px; position:absolute; top:0px; left:320px; text-align:center; padding:1em; }   #container{ width:640px; height:480px; border:1px solid black; position:relative; margin:auto; }   #bob{ background:red; opacity:0; }   #mary{ background:blue; opacity:0; }   #louise{ background:green; opacity:0; }   #buttonBob{ }   #buttonMary{ }   #buttonLouise{ }   #navBar{ position:absolute; left:0px; top:0px; padding:1em; }   .title{ font-size:3em; font-style:italic; }	  function setup{ $("#buttonBob").click(showBob); $("#buttonMary").click(showMary); $("#buttonLouise").click(showLouise); }	function showBob{ $("#bob").stop.fadeTo(500,1); $("#mary").stop.fadeTo(500,0); $("#louise").stop.fadeTo(500,0); }	function showMary{ $("#bob").stop.fadeTo(500,0); $("#mary").stop.fadeTo(500,1); $("#louise").stop.fadeTo(500,0); }	function showLouise{ $("#bob").stop.fadeTo(500,0); $("#mary").stop.fadeTo(500,0); $("#louise").stop.fadeTo(500,1); }	$(setup); Bob Mary Louise Mary Bob Louise code

code <!doctype html>
 * Ex.3**

 body{ background:#00bbaa; font-size:12px; font-family:'Verdana','Arial',sans-serif; }

#container{ width:640px; height:480px; background:#aaeecc; border:1px solid black; margin:auto; position:relative; }

.box{ width:100px; height:100px; position:absolute; -moz-border-radius:10px; border:1px solid black; }

#foo{ background-image:url('button1.png'); left:10px; top:10px; }

#foo:hover{ background-image:url('button1-over.png'); }

#foo:active{ background-image:url('button1-click.png'); }

#bar{ width:400px; height:400px; background:pink; position:absolute; left:150px; top:150px; z-index:1; padding:1em; opacity:0; }     function setup{ $("#foo").hover(bob,louis); }

function bob{ $("#bar").stop.fadeTo(500,1); }

function louis{ $("#bar").stop.fadeTo(500,0); }

$(setup);

Sacrifice is a video game developed by Shiny Entertainment for the Windows 98 platform. Published in 2000 by Interplay Entertainment, it was the first commercial video game to take advantage of video graphics cards that can process transform, clipping, and lighting instructions. In the real-time strategy game, players control wizards who fight each other with summoned creatures and spells. The wizards collect souls to summon creatures, and their mana—energy for casting spells—constantly regenerates. Players customize their attacks by choosing from spells and creatures aligned to five gods. To defeat an opponent, the player's wizard sacrifices a friendly unit at the opposing wizard's altar, thereby desecrating it and banishing the enemy wizard. Aside from a single-player campaign, up to four players can play against each other over computer networks in a multiplayer mode. Sacrifice was praised by reviewers for the novel designs of its creatures and for its humorous content.

code

code <!doctype html>
 * Ex.2**

 body{ background:#00bbaa; font-size:12px; font-family:'Verdana','Arial',sans-serif; }

#container{ width:640px; height:480px; background:#aaeecc; border:1px solid black; margin:auto; position:relative; }

.box{ width:100px; height:100px; position:absolute; -moz-border-radius:10px; border:1px solid black; }

#foo{ background-image:url('button1.png'); left:0px; top:0px; }

#foo:hover{ background-image:url('button1-over.png'); }

#foo:active{ background-image:url('button1-click.png'); }

#bar{ width:400px; height:400px; background:pink; position:absolute; left:50px; top:50px; z-index:1; padding:1em; display:none; }

#mary{ background-image:url('untitled2.jpg'); left:200px; top:200px; }    var mary, bar, foo;

var showSwitch = false;

function setup{ mary = document.getElementById("mary"); bar = document.getElementById("bar"); foo = document.getElementById("foo"); foo.onmouseover = bob; foo.onmouseout = louis; }

function bob{ bar.style.display="block"; }

function louis{ bar.style.display="none"; }

window.onload = setup;

Sacrifice is a video game developed by Shiny Entertainment for the Windows 98 platform. Published in 2000 by Interplay Entertainment, it was the first commercial video game to take advantage of video graphics cards that can process transform, clipping, and lighting instructions. In the real-time strategy game, players control wizards who fight each other with summoned creatures and spells. The wizards collect souls to summon creatures, and their mana—energy for casting spells—constantly regenerates. Players customize their attacks by choosing from spells and creatures aligned to five gods. To defeat an opponent, the player's wizard sacrifices a friendly unit at the opposing wizard's altar, thereby desecrating it and banishing the enemy wizard. Aside from a single-player campaign, up to four players can play against each other over computer networks in a multiplayer mode. Sacrifice was praised by reviewers for the novel designs of its creatures and for its humorous content.

code

code <!doctype html>
 * Ex.1**

 body{ background:#00bbaa; font-size:12px; font-family:'Verdana','Arial',sans-serif; }

#container{ width:640px; height:480px; background:#aaeecc; border:1px solid black; margin:auto; position:relative; }

.box{ width:100px; height:100px; position:absolute; -moz-border-radius:10px; border:1px solid black; }

#foo{ background-image:url('button1.png'); left:0px; top:0px; }

#foo:hover{ background-image:url('button1-over.png'); }

#foo:active{ background-image:url('button1-click.png'); }

#bar{ width:400px; height:400px; background:pink; position:absolute; left:50px; top:50px; z-index:1; padding:1em; }

#mary{ background-image:url('untitled2.jpg'); left:200px; top:200px; }    var mary, bar, foo;

var showSwitch = false;

function setup{ mary = document.getElementById("mary"); bar = document.getElementById("bar"); foo = document.getElementById("foo"); foo.onclick = bob; }

function bob{ if(!showSwitch){ showSwitch = true; bar.style.display="block"; } else if(showSwitch){ showSwitch = false; bar.style.display="none"; }       console.log(showSwitch); }

window.onload = setup;

Sacrifice is a video game developed by Shiny Entertainment for the Windows 98 platform. Published in 2000 by Interplay Entertainment, it was the first commercial video game to take advantage of video graphics cards that can process transform, clipping, and lighting instructions. In the real-time strategy game, players control wizards who fight each other with summoned creatures and spells. The wizards collect souls to summon creatures, and their mana—energy for casting spells—constantly regenerates. Players customize their attacks by choosing from spells and creatures aligned to five gods. To defeat an opponent, the player's wizard sacrifices a friendly unit at the opposing wizard's altar, thereby desecrating it and banishing the enemy wizard. Aside from a single-player campaign, up to four players can play against each other over computer networks in a multiplayer mode. Sacrifice was praised by reviewers for the novel designs of its creatures and for its humorous content.

code

code <!doctype html>
 * setup for internal styles and scripts**

<style type="text/css"> <script type="text/javascript">

code

code <!doctype html>
 * setup for external stylesheet and scripts**

<link rel="stylesheet" type="text/css" href="stylesheet.css"> <script type="text/javascript" src="main.js">

code