¦b Netscape ¤¤¡A°£¤F LAYER ©M ILAYER ¨ã¦³ LAYER ¤¸¥ó§ï¼g¯à¤O¥~¡A¤@¯ë¶Ç²Î
HTML ¤¤ªº Block-Level ¼ÐÅÒ¡A¤]¥i¸g¥Ñ³]©w CSS position ÄÝ©Ê¡A¨Ï¨ä¨ú±o·Ç
LAYER ©ÎºÙ§@ÀÀ LAYER ªº¯à¤O¡A¶i¦Ó¦¨¬° Netscape document.layers ¶°¦Xª«¥ó¤¤
ªº¦¨û¡C¦p<DIV STYLE="position:absolute;"> ±N¨Ï±o³oÓ DIV °Ï¬q³Q·í°µ·Ç
LAYER ¨Ó³B²z¡A¦Ó <SPAN STYLE="position:relative;"> «h·|¨Ï SAPN ¼ÐÅÒ³Q
·í°µ·ÇILAYER ¨Ó§PÂ_¡C§ÚÌ¥i¥H°µÓ¹êÅç¡A§ÚÌ¥ý¦b HTML ¤¤³o»ò¼g¡G
<DIV ID="div1">
§Ú¬O HTML DIV °Ï¬q
</DIV>
µM«á¥Î³o¼Ëªº JavaScript ¹ï document.layers ª«¥ó¤º®e¥[¥H°»´ú¡G
var obj,str="";
for (obj in document.layers)
{str+=obj+" : "+document.layers[obj]+"\n";}
°õ¦æµ²ªG½Ð«ö
³oùØ¡C
·í§A«ö¤U [layers ª«¥ó°»´ú] ¶s®É¡A¸ê°TÅã¥Ü¬° "length:0" ¡Aªí¥Ü layers ¤¤¨S¦³
¥ô¦ó layer ª«¥ó¡C±µµÛ§Ú̬° DIV ¼ÐÅÒ¥[¤J CSS position ÄÝ©Ê¡G
<DIV ID="div1" STYLE="position:absolute;">
§Ú¬O position=absolute ªº DIV °Ï¬q
</DIV>
¨Ã¥B¼W¥[¤F H2,P,SPAN ¤TÓ¼ÐÅÒ¡A¦³ªº position ¬° relative ¡A¦³ªººû«ù static ªº
¹w³]ª¬ºA¡A°õ¦æµ²ªG½Ð«ö
³oùØ¡C
¥Ñ½d¨Ò¥iª¾¡A¤Z¬O position ¬° relative or absolute ªº¡A³£¥[¤J¤F document.layers
¶°¦Xª«¥ó¤¤¡Aposition ¬° static ©Î¨S¦³³]ªº¡A«h¤´ºû«ù컪¡C