Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

css,javascriptµÄÔ¤¼ÓÔØ

css,javascriptµÄÔ¤¼ÓÔØ
ΪÁËÌá¸ßÍøÕ¾µÄ¼ÓÔØËٶȣ¬ÓÐÒ»¸öºÜÖØÒªµÄÊֶξÍÊÇÔÚÓû§ä¯ÀÀ¹ý³ÌÖеÄÉÏÓÎÍøÕ¾×öÒ»¸öÎļþµÄÔ¤¼ÓÔØ¡£Ô¤¼ÓÔØÎļþÒ»°ãÓÐÁ½ÖÖ³£Óõķ½Ê½£ºxhrºÍ¶¯Ì¬²åÈë½ÚµãµÄ·½Ê½¡£¶¯Ì¬²åÈë½ÚµãÊÇ×îΪ¼òµ¥Ò²×îΪ¹ã·ºµÄÒ»ÖÖÒì²½¼ÓÔØ·½Ê½(ÀýÈçyuiµÄGetÄ£¿é)£¬È»ºóʹÓö¯Ì¬²åÈë½Úµã·½·¨¼ÓÔصÄÎļþ¶¼»áÔÚ¼ÓÔغóÁ¢¼´Ö´ÐУ¬javascriptµÄÖ´ÐÐÒ»·½Ãæ»áÕ¼ÓÃä¯ÀÀÆ÷jsÖ´Ðнø³Ì£¬ÁíÒ»·½ÃæÒ²¿ÉÄܸıäÒ³Ãæ½á¹¹£¬¶øcssµÄÖ´ÐиüÓпÉÄÜÈÃÕû¸öÒ³Ãæ±ä»¯¡£xhr·½Ê½ËäÈ»²»»áÖ´Ðнű¾£¬µ«ÊÇÓÉÓÚͬÓòµÄÏÞÖÆ£¬ÇÒÈç½ñÍøÕ¾µÄ¾²Ì¬Îļþ¶¼ÊDz¿ÊðÔÚcdn·þÎñÆ÷ÉÏ£¬ÈçºÎÔ¤¼ÓÔØcss jsÎļþÒ²±äÓеãÐþÃîÁË¡£
Stoyan Stefanov ׫ÎļòÃ÷µÄ²ûÊöÁËÒ»ÖÖ¼ÓÔØÎļþ¶ø²»»áÈÃÖ®Ö´Ðеķ½·¨¡£Ô­ÎĿɼû  http://www.phpied.com/preload-cssjavascript-without-execution/
¾ßÌåµÄ·½·¨ÊÇ£¬ieÖÐʹÓà new Image().src È¥Ô¤¼ÓÔØÎļþ£¬¶øÆäËûä¯ÀÀÆ÷ʹÓö¯Ì¬²åÈëµÄ <object> ±êÇ©À´Íê³É¼ÓÔØ¡£
²¿·Ö´úÂëÈçÏÂ
code
 1 window.onload = function () {
 2 
 3     var i = 0,
 4         max = 0,
 5         o = null,
 6 
 7         // list of stuff to preload
 8         preload = [
 9             'http://tools.w3clubs.com/pagr2/<?php echo $id; ?>.sleep.expires.png',
10             'http://tools.w3clubs.com/pagr2/<?php echo $id; ?>.sleep.expires.js',
11             'http://tools.w3clubs.com/pagr2/<?php echo $id; ?>.sleep.expires.css'
12         ],
13         isIE = naviga


Ïà¹ØÎĵµ£º

ÍøÕ¾ºÚ°×°æµÄcssÑùʽ

1¡¢CSS·ç¸ñÍøÕ¾£¬½«ÏÂÃæÕâ¶Î´úÂëÌí¼Óµ½ÍøÕ¾cssÎļþ×¶Ë¡£
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
»òÕߣº
ÔÚcssÎļþµÄbodyÖмÓÈëfilter:gray£º
body {filter:gray}
¡¡¡¡2¡¢Î´ÆôÓÃCSS·ç¸ñÍøÕ¾£¬ÔÚÍøÒ³»òÕßÄ£°åµÄHTML´úÂëºÍÖ®¼ä²åÈëÒÔÏ´úÂ룺
<style>
html{filter:pro ......

IE6 Óë Firefox ÏÂÃæһЩcss¼æÈÝÐÔÎÊÌâ

Åöµ½ºÃЩÎÊÌ⣬FirefoxÏÂÃæ¿´×źÜÍêÃÀ£¬ie6ÏÂÃæ¾Í²Ò²»È̶㬻¹ºÃ£¬Ò»µãµãÂýÂý½â¾öÁË¡£Ò»Ð©¶«Î÷ժ¼һÏ£¬ÒÔºóÒ²ÐíÓõõ½¡£
DIV+CSS½â¾öIE6£¬IE7£¬IE8£¬FF¼æÈÝÎÊÌâ
ÄÇÎÒÀ´ËµËµ°É£¬×öÁ˼¸ÄêµÄDIV+CSS£¬Ò²»ýÀÛÁ˲»ÉÙ½â¾ö¼æÈÝÎÊÌâµÄ·½·¨£¬ÎÒÕâÀïֻ˵ÏÖÔÚÖ÷Á÷µÄ¼¸¸ö£¬£¨IE6£¬IE7£¬IE8£¬FF£©ÆäËüµÄûȥÑо¿¹ý
1.ie8ϼæÈÝÎÊÌ⣠......

[CSS HACK]IE6¡¢IE7¡¢IE8¡¢Firefox¼æÈÝÐÔÎÊÌâ

1.Çø±ðIEºÍ·ÇIEä¯ÀÀÆ÷
#tip {
background:blue; /*·ÇIE ±³¾°藍É«*/
background:red \9; /*IE6¡¢IE7¡¢IE8±³¾°紅É«*/
}
2.Çø±ðIE6,IE7,IE8,FF
¡¾Çø±ð·ûºÅ¡¿£º¡¸\9¡¹¡¢¡¸*¡¹¡¢¡¸_¡¹
¡¾Ê¾Àý¡¿£º
#tip {
background:blue; /*Firefox ±³¾°±äÀ¶É«*/
background:r ......

DIV+CSS½¨Õ¾¶Ôä¯ÀÀÆ÷µÄ¼æÈÝÐÔÎÊÌâºÍ×¢ÒâÊÂÏî

ʹÓÃDIV+CSS¹¹¼ÜºÃ´¦²»ÉÙ£¬µ«Ò²È·Êµ´æÔÚһЩÎÊÌ⣬ÏÖÔÚÈÃÍøÒ³Éè¼Æʦ×îÍ·ÌÛµÄÊÂĪ¹ýÓÚDIV+CSS¶Ôä¯ÀÀÆ÷µÄ¼æÈÝÐÔÁË£¬¿ÉÄÜÄãÓùßÁËIE6£¬×ö³öÀ´µÄ¶«Î÷û¸Ð¾õµ½Óжà´óÒì³££¬µ«ÊÇ°ÑͬÑùµÄ¶«Î÷·Åµ½IE7ÀïÈ¥¿´µÄ»°£¬¾Í»á·¢ÏֺܶàÎÊÌ⣬Èç¹û·Åµ½»ðºüä¯ÀÀÆ÷ÀïÈ¥¿´£¬½á¹û¸ü²»¾¡ÈËÒâ¡£
    Ò»¸öÒ³Ãæ´ÓÖÆ×÷µÄ¿ªÊ¼¾Í¾ö¶¨ÁËË ......

JavascriptÖÐShowModalDialog¹¦ÄÜ

ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º
´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄܲÙ×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL
±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´Ö¸¶¨¶Ô»°¿òÒªÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ