CSSÖÐexpressionʹÓüò½é
¡¡¡¡IE5¼°ÆäÒÔºó°æ±¾Ö§³ÖÔÚCSSÖÐʹÓÃexpression£¬ÓÃÀ´°ÑCSSÊôÐÔºÍJavas cript±í´ïʽ¹ØÁªÆðÀ´£¬ÕâÀïµÄCSSÊôÐÔ¿ÉÒÔÊÇÔªËعÌÓеÄÊôÐÔ£¬Ò²¿ÉÒÔÊÇ×Ô¶¨ÒåÊôÐÔ¡£¾ÍÊÇ˵CSSÊôÐÔºóÃæ¿ÉÒÔÊÇÒ»¶ÎJavas cript±í´ïʽ£¬CSSÊôÐÔµÄÖµµÈÓÚJavas cript±í´ïʽ¼ÆËãµÄ½á¹û¡£ ÔÚ±í´ïʽÖпÉÒÔÖ±½ÓÒýÓÃÔªËØ×ÔÉíµÄÊôÐԺͷ½·¨£¬Ò²¿ÉÒÔʹÓÃÆäËûä¯ÀÀÆ÷¶ÔÏó¡£Õâ¸ö±í´ïʽ¾ÍºÃÏñÊÇÔÚÕâ¸öÔªËصÄÒ»¸ö³ÉÔ±º¯ÊýÖÐÒ»Ñù¡£
¡¡¡¡¸øÔªËعÌÓÐÊôÐÔ¸³Öµ
¡¡¡¡ÀýÈ磬Äã¿ÉÒÔÒÀÕÕä¯ÀÀÆ÷µÄ´óСÀ´°²ÖÃÒ»¸öÔªËصÄλÖá£
#myDiv {
position: absolute;
width: 100px;
height: 100px;
left: expression(document.body.offsetWidth - 110 + "px");
top: expression(document.body.offsetHeight - 110 + "px");
background: red;
}
¡¡¡¡¸øÔªËØ×Ô¶¨ÒåÊôÐÔ¸³Öµ
¡¡¡¡ÀýÈ磬Ïû³ýÒ³ÃæÉϵÄÁ´½ÓÐéÏß¿ò¡£ ͨ³£µÄ×ö·¨ÊÇ£º
<a href="link1.htm" onfocus="this.blur()">link1</a>
<a href="link2.htm" onfocus="this.blur()">link2</a>
<a href="link3.htm" onfocus="this.blur()">link3</a>
¡¡¡¡´Ö¿´»òÐí»¹ÌåÏÖ²»³ö²ÉÓÃexpressionµÄÓÅÊÆ£¬µ«Èç¹ûÄãµÄÒ³ÃæÉÏÓм¸Ê®ÉõÖÁÉÏ°Ù¸öÁ´½Ó£¬ÕâʱµÄÄãÄѵÀ»¹»á»úеʽµØCtrl+C£¬Ctrl+Vô£¬ºÎ¿öÁ½ÕßÒ»±È½Ï£¬Äĸö²úÉúµÄÈßÓà´úÂë¸ü¶àÄØ£¿
¡¡¡¡²ÉÓÃexpressionµÄ×ö·¨ÈçÏ£º
<style type="text/css">
a {star : expression(onfocus=this.blur)}
</style>
<a href="link1.htm">link1</a>
<a href="link2.htm">link2</a>
<a href="link3.htm">link3</a>
¡¡¡¡ËµÃ÷£ºÀïÃæµÄstar¾ÍÊÇ×Ô¼ºÈÎÒⶨÒåµÄÊôÐÔ£¬Äã¿ÉÒÔËæ×Ô¼ºÏ²ºÃÁíÍⶨÒ壬½Ó×Å°üº¬ÔÚexpression()ÀïµÄÓï¾ä¾ÍÊÇJS½Å±¾£¬ÔÚ×Ô¶¨ÒåÊôÐÔÓëexpressionÖ®¼ä¿É±ðÍüÁË»¹ÓÐÒ»¸öÒýºÅ£¬ÒòΪʵÖÊ»¹ÊÇCSS£¬ËùÒÔ·ÅÔÚstyle±êÇ©ÄÚ£¬¶ø·Çs criptÄÚ¡£OK£¬ÕâÑù¾ÍºÜÈÝÒ×µØÓÃÒ»¾ä»°ÊµÏÖÁËÒ³ÃæÖеÄÁ´½ÓÐéÏß¿òµÄÏû³ý¡£²»¹ýÄãÏȱðµÃÒ⣬Èç¹û´¥·¢µÄÌØЧÊÇCSSµÄÊôÐԱ仯£¬ÄÇô³öÀ´µÄ½á¹û»á¸úÄãµÄ±¾ÒâÓвî±ð¡£ÀýÈçÄãÏëËæÊó±êµÄÒƽøÒƳö¶ø¸Ä±äÒ³ÃæÖеÄÎı¾¿òÑÕÉ«¸ü¸Ä£¬Äã¿ÉÄÜÏ뵱ȻµÄ»áÈÏΪӦ¸ÃдΪ
<style type="text/css">
inpu
Ïà¹ØÎĵµ£º
Eric Meyer’s CSS Reset
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, fo ......
Çø±ðspan div p Èý¸ö±êÇ©µÄÓ÷¨
spanºÍdivµÄ²»Í¬Ö®´¦ÔÚÓÚspanÊÇÄÚÁªµÄ£¬ÓÃÔÚһС¿éµÄÄÚÁªHTMLÖУ¬Ç°ºó²»¶ÏÐÐ.
divÔªËØÊǿ鼶µÄ£¨¼òµ¥µØ˵£¬ËüµÈͬÓÚÆäÇ°ºóÓжÏÐУ©£¬ÓÃÓÚ×éºÏÒ»´ó¿éµÄ´úÂë¡£
p(¶ÎÂä)ÔªËØÊǿ鼶µÄ,Ç°ºó¶ÏÐÐ,¶øÇÒ»¹ÒªÔÙ¸ôÒ»ÐÐ.Ï൱ÓÚ¶ÏÁ½ÐÐ.
<div> ¿É¶¨ÒåÎĵµÖеķÖÇø»ò½Ú£¨division ......
CSS hackÊÇÖ¸ÎÒÃÇΪÁ˼æÈݸ÷ä¯ÀÀÆ÷£¬¶øʹÓõÄÌرðµÄcss¶¨Òå¼¼ÇÉ¡£ÕâÊǹúÍâÕªÀ´µÄÒ»ÕÅCSS hackÁÐ±í£¬ÏÔʾÁ˸÷ä¯ÀÀÆ÷¶Ôcss hackµÄÖ§³Ö³Ì¶È£¬¶ÔÎÒÃÇÖÆ×÷¼æÈÝÍøÒ³·Ç³£ÓаïÖú¡£
ÆÁ±ÎIEä¯ÀÀÆ÷£¨Ò²¾ÍÊÇIEϲ»ÏÔʾ£© *:lang(zh) select {font:12px !important;} /*FF,OP¿É¼û£¬ÌرðÌáÐÑ£ºÓÉÓÚOpera×î½üµÄÉý¼¶£¬Ä¿Ç°´Ë¾äֻΪFF ......
µÚÒ»Õ£ºÓ¦ÖªµÀ
1.1 DIV+CSS
µÄ½Ð·¨ÊDz»×¼È·µÄ
ÎÒÏë·²ÊÇÀ´µ½“Õâ¸öרÌ┵Äͬѧ£¬ºÜ´ó²¿·ÖÊdzå×ÅDIV+CSSÀ´µÄ£¬Ä¿µÄ¾ÍÊÇѧϰ
DIV+CSSµÄ£¬ËµµÄÔÙÖ±½ÓһЩ¾ÍÊÇѧϰÈçºÎÓÃDIV+CSS²¼¾ÖÒ³Ã棬ÈçºÎ´ÓÒ»ÕÅͼƬÖÆ×÷³É±ê×¼µÄDIV+CSSÒ³Ãæ¡£
Èç¹ûÄã¿´ÍêµÚÒ»¶Î»¹Ã»Óз¢ÏÖ´íÎóµÄ»°£¬ÄÇÄã¾ÍºÜÓб ......
CSS£«DIVÊÇÍøÕ¾±ê×¼Öг£ÓõÄÊõÓïÖ®Ò»£¬Í¨³£ÎªÁË˵Ã÷ÓëHTMLÍøÒ³Éè¼ÆÓïÑÔÖеıí¸ñ¶¨Î»·½Ê½µÄÇø±ð£¬ÒòΪXHTMLÍøÕ¾Éè¼Æ±ê×¼ÖУ¬²»ÔÙʹÓñí¸ñ¶¨Î»¼¼Êõ£¬¶øÊDzÉÓÃcss+divµÄ·½Ê½ÊµÏÖ¸÷ÖÖ¶¨Î»¡£ÄÇôʹÓÃDIV+CSS±àÂëʱºÜÈÝÒ×·¸Ò»Ð©´íÎó¡£±¾ÎÄÁоÙÁËһЩ³£¼ûµÄ´íÎó£º
1. ¼ì²éHTMLÔªËØÊÇ·ñÓÐƴд´íÎó¡¢ÊÇ·ñÍü¼Ç½áÊø±ê¼Ç
ÓÐʱºòÎÒÃÇÔÚ ......