ÍøÕ¾±ä³É»ÒºÚÉ« css ´úÂë
µØÕð ÍøÕ¾±ä³É»ÒºÚÉ« css ´úÂë
5.19-5.21Ϊȫ¹ú°§µ¿ÈÕ£¬ °Ù¶È¡¢ÍøÒס¢ÐÂÀ˵ȸ÷´óÍøÕ¾¾ù±ä³ÉÁ˻ҺÚÉ«ÍøÒ³¡£ÔõÑùʹÍøÒ³±ä³É»ÒºÚÉ«ÄØ£¿
¹úÎñÔº¾ö¶¨5ÔÂ19ÈÕÖÁ21ÈÕΪȫ¹ú°§µ¿ÈÕΪ·½±ãÕ¾µã°§µ¿£¬ÌØÌṩcssÂ˾µ´úÂ룬ÒÔ±í°§µ¿¡£ÒÔÏÂΪȫվCSS´úÂë¡£
html {...}{ filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
ʹÓ÷½·¨£ºÕâ¶Î´úÂë¿ÉÒÔ±äÍøҳΪºÚ°×£¬½«´úÂë¼Óµ½CSS×¶Ë¾Í¿ÉÒÔʵÏÖËØ×°¡£½¨ÒéÈ«¹úÕ¾³¤¶¯ÆðÀ´¡£ÎªÔÚµØÕðÖÐÓöÄѵÄͬ°û°§µ¿¡£
Èç¹ûÍøվûÓÐʹÓÃCSS£¬¿ÉÒÔÔÚÍøÒ³/Ä£°åµÄHTML´úÂë<head>ºÍ</head> Ö®¼ä²åÈ룺
<style>...
html{...}{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);}
</style>
ÓÐһЩվ³¤µÄÍøÕ¾¿ÉÄÜʹÓÃÕâ¸öcss ²»ÄÜÉúЧ£¬ÊÇÒòΪÍøվûÓÐʹÓÃ×îеÄÍøÒ³±ê×¼ÐÒé
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Ç뽫ÍøÒ³×îÍ·²¿µÄ<html>Ì滻ΪÒÔÉÏ´úÂë¡£
ÓÐһЩÍøÕ¾FLASH¶¯»µÄÑÕÉ«²»Äܱ»CSSÂ˾µ¿ØÖÆ£¬¿ÉÒÔÔÚFLASH´úÂëµÄ<object …>ºÍ</object>Ö®¼ä²åÈ룺
×î¼òµ¥µÄ°ÑÒ³Ãæ±ä³É»ÒÉ«µÄ´úÂëÊÇÔÚhead Ö®¼ä¼Ó
<style type="text/css">...
html {...}{
FILTER: gray
}
</style>
Ïà¹ØÎĵµ£º
ºÐÄ£ÐÍ£¬ÊÇXHTML
+CSS
²¼¾Ö
Ò³ÃæÖеÄ
ºËÐÄ£¡ÊǹØϵµ½Éè¼ÆÖÐÅŰ涨λµÄ¹Ø¼ü£¬¶¼×ñѺÐÄ£Ð͹淶£¬ÀýÈç<div>¡¢<p>¡¢<a>……ºÐÄ£ÐÍ°üº¬
(Íâ
±ß¾à)margin£¬(Äڱ߾à)padding £¬(ÄÚÈÝ)content£¬(±ß¿ò)border¡£
ÏÂͼÊÇCSSºÐÄ£Ð͵ÄʾÒâͼ
ÕâЩÊôÐÔÎÒÃÇ¿ÉÒÔ°ÑËüתÒƵ½ÎÒÃÇÈÕ³£Éú» ......
¡¡CSSѧÆðÀ´²¢²»ÄÑ£¬µ«ÔÚ´óÐÍÏîÄ¿ÖУ¬¾Í±äµÃÄÑÒÔ¹ÜÀí£¬ÌرðÊDz»Í¬µÄÈËÔÚCSSÊéд·ç¸ñÉÏÉÔÓв»Í¬£¬ÍŶÓÉϾ͸ü¼ÓÄÑÒÔ¹µÍ¨£¬Îª´Ë×ܽá
ÁËһЩÈçºÎʵÏÖ¸ßЧÕû½àµÄCSS´úÂëÔÔò£º
1
. ʹÓÃResetµ«²¢·ÇÈ«¾ÖReset
¡¡¡¡²»Í¬ä¯ÀÀÆ÷ÔªËصÄĬÈÏÊôÐÔÓÐËù²»Í¬£¬Ê¹ÓÃReset¿ÉÖØÖÃä¯ÀÀÆ÷ÔªËصÄһЩĬÈÏÊôÐÔ£¬ÒÔ´ïµ½ä¯ÀÀÆ÷µÄ¼æÈÝ¡£µ«ÐèÒª×¢Ò ......
Steve SoudersÔÚËûµÄ¡¶High Performance Web Sites¡·Ò»ÊéÖÐÌá³öÌá¸ßÍøҳЧÂʵÄ14Ìõ×¼Ôò£¬ÕâЩ¿ÉÒÔʹÓÃYahoo! YSlowÀ´½øÐÐÒ»¸ö±È½ÏÐÎÏóµÄ¼ì²â¡£
ÕâÀïÖ÷ÒªÀ´ËµÒ»ÏµÚÒ»Ìõ×¼Ôò£ºMake Fewer HTTP Requests£¬Òâ˼¾ÍÊǾ¡¿ÉÄܵļõÉÙHTTPÇëÇó¡£µ±Ê±Òª´ïµ½Õâ¸öÄ¿µÄÓкܶàÖÖ·½·¨£¬ÆäÖÐ×îÖØÒªµÄÒ»µã¾ÍÊǽ«CSSÎļþºÍJavascriptÎļþ·Ö±ð ......
¡¡¡¡IE5¼°ÆäÒÔºó°æ±¾Ö§³ÖÔÚCSSÖÐʹÓÃexpression£¬ÓÃÀ´°ÑCSSÊôÐÔºÍJavas cript±í´ïʽ¹ØÁªÆðÀ´£¬ÕâÀïµÄCSSÊôÐÔ¿ÉÒÔÊÇÔªËعÌÓеÄÊôÐÔ£¬Ò²¿ÉÒÔÊÇ×Ô¶¨ÒåÊôÐÔ¡£¾ÍÊÇ˵CSSÊôÐÔºóÃæ¿ÉÒÔÊÇÒ»¶ÎJavas cript±í´ïʽ£¬CSSÊôÐÔµÄÖµµÈÓÚJavas cript±í´ïʽ¼ÆËãµÄ½á¹û¡£ ÔÚ±í´ïʽÖпÉÒÔÖ±½ÓÒýÓÃÔªËØ×ÔÉíµÄÊôÐԺͷ½·¨£¬Ò² ......
²»Í¬µÄä¯ÀÀÆ÷ÒªÇó²»Í¬µÄÑùʽÉùÃ÷£¬¸÷ä¯ÀÀÆ÷¼°Æä¸÷°æ±¾Óв»Í¬³Ì¶ÈµÄ CSS Ö´ÐеÄÍêÕûÐÔ¡£²ÉÓõÄÊÇ Internet Explorer µÄÌõ¼þ×¢ÊÍÓï·¨µÄ˼Ï룬²¢°ÑËüÄÚÁªµ½ CSS ÉùÃ÷Ö®ÖС£
¡¡¡¡Ìõ¼þ CSS Ö÷ÒªÓÃÓÚÖ¸³öÒ»¸öÌرðµÄ CSS ÉùÃ÷ÊDz»ÊÇÓ¦¸ÃÓÃÓÚÒ»¸öÌرðµÄä¯ÀÀÆ÷¡£µ±È»Ä㲻ϣÍû¾³£Õâô×ö£¬µ«Êǵ±ÄãÐèÒªÕë¶ÔÒ»¸öä¯ÀÀÆ÷µÄʱºò£¬Ëü»á·Ç³ ......