CSS Expression µÄÓÅ»¯
IE ä¯ÀÀÆ÷ÖÐ CSS ÌØÐÔµÄ×î´óµÄÎÊÌ⣺»á·´¸´Ö´ÐУ¬Ã¿ÃëÖÓ¿ÉÄÜÖ´ÐÐÁ˳ɰÙÉÏǧ´Î£¬ÓÐÑÏÖصÄÐÔÄÜÎÊÌâ¡£
ÈçºÎ¶Ô CSS ½øÐÐÓÅ»¯ÄØ£¿
ÖÁÉÙ£ºÈç¹ûÎÒÃǽ« CSS ÔÚÆ¥ÅäµÄÔªËØÖнöÖ´ÐÐÒ»´Î£¬ÐÔÄܽ«»áÌáÉýºÜ´ó¡£
old9 ÔÚ ¡¶CSS Reloaded¡·Ò»ÎÄÖÐÌṩÁËÒ»¸ö½â¾ö·½°¸£º
ÔÚ CSS Óï¾äÌåÀ½«´¥·¢¸Ã µÄ CSS ÊôÐÔÖØÖá£
ÀýÈ磺
div {
zoom: (function(el){el.style.zoom = "1"; alert(el.tagName);}(this));
}
²¹³ä¼¸µã£º
CSS Ö´ÐÐÔÚÈÎÒâÒ»¸öÆ¥ÅäµÄÔªËØÉÏ¡£
ÔÚ CSS ÄÚ£¬ “this”¹Ø¼ü×ÖÖ¸Ïòµ±Ç°Æ¥ÅäµÄ HTML ÔªËØ¡£
CSS ÊôÐÔÑ¡ÓÃһЩ²»³£ÓõÄÊôÐÔÀ´´¥·¢£¬´¥·¢ÍêÖØÖûØĬÈÏÖµ¡£
×î½üÔÚ Ajaxian µÄÎÄÕ¡¶Creating a querySelector for IE that runs at “native speed”¡· Öп´µ½×÷Õß Dion Almaer Ò²ÌṩÁËÒ»¸öÀàËƵĽâ¾ö·½Ê½£º
div {
-singlex: (this.singlex ? 0 : (function(t) { alert(t.tagName); t.singlex = 0; } )(this));
}
µ«´Ë´úÂ벢ûÓÐÍêÈ«½â¾ö CSS ×î´óµÄÐÔÄÜÎÊÌ⣬ÒòΪÿ´Î´¥·¢»¹ÊÇҪȥִÐÐ ½Å±¾¡£ÉõÖÁÄã¿ÉÒÔ¹ö¶¯ÏÂÄãÊó±êµÄÖмä¹öÂÖ£¬ÒâÏò²»µ½µÄÎÊÌ⽫»á·¢Éú¡£ ×îºóÇ¿µ÷£º½öÊÇ¶Ô CSS ×öÁËÓÅ»¯£¬µ«²¢Î´Ëµ CSS ¾Í²»´æÔÚÆäËû·½ÃæµÄÎÊÌâ¡£ ±¾ÎÄÀ´Ô´£ºhttp://www.planabc.net/2009/09/21/optimization_of_css_e/
Ïà¹ØÎĵµ£º
ת×Ô£º
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ͼƬÅÜÂíµÆ</title>
</head>
<body>
<div style="overflow:hidden; width:350px" id='div'>
<!-- ÕâÀïÊǵÚÒ»¸ö¹Ø¼üµã£¬o ......
<div id="imgbox" style="height:110px;width:600px;overflow:hidden;">
<div id="imgbox1" style="float:left;width:1000%">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www ......
Óà UL ÖÆ×÷²Ëµ¥ÏÖÔڷdz£Á÷ÐУ¬ÄÇÎÒÃÇÒ²´Õ´ÕÈÈÄÖ£¬µÚÒ»½²¾Í˵˵Óà UL ÖÆ×÷µ¼º½²Ëµ¥µÄ·½·¨£¬ÕâÒ»½²ÊÇÈëÃŰ棬ֻÊÇʵÏÖ»ù±¾¹¦ÄÜ£¬»¶Ó¸÷λ·¢²¼×Ô¼ºµÄʵÏÖ·½Ê½¡£
ÎÒÃÇÏȶ¨Ò»Ï HTML ´úÂ룺
<ul id="menu">
<li><a href="http://www.codebit.cn">CodeBit.cn</a></li>
<li><a href="h ......
ä¯ÀÀÆ÷¼æÈÝ¿ÉÒÔ˵ÊÇÇ°¶Ë¿ª·¢ËùÒªÃæ¶ÔµÄµÚÒ»¸öÌôÕ½£¬Ä¿Ç°ÎҵĵçÄÔÉÏÒѾ°²×°ÁË6ÖÖä¯ÀÀÆ÷£¨»ùÓÚIEÄں˵IJ»Ë㣬ÈçMaxthonµÈ£©¡£
¡¡¡¡CSS hacksÀûÓÃä¯ÀÀÆ÷µÄ©¶´À´Òþ²ØÌض¨ä¯ÀÀÆ÷µÄCSS¹æÔò¡£ÊµÏÖä¯ÀÀÆ÷¼æÈÝÖ÷ÒªÓÐÁ½ÖÖ·½Ê½Ìõ¼þÑùʽ±íºÍCSS Hacks£¨Selector Hacks¡¢Attribute Hacks£©¡£¶Ô´Ë¸ù¾ÝһЩ×ÊÁÏ»ã×ÜÁËһЩCSS Hacks·½·¨¡ ......