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

¡¾Õª×ÔÍøÒײ©¿Í¡¿FireFoxÓëIEÖÐCSS¼æÈݼ¼Êõ¼¯ÃàÕûÀí

1.cssÔÚ²»Í¬ä¯ÀÀÆ÷ÏÂÏÔʾЧ¹û²»Í¬
firefoxºÍIE¶ÔijЩcssÑùʽµÄÈ϶¨Óв»ÉÙÇø±ð£¬°üÀ¨£º
·                            ulºÍolµÄĬÈÏpaddingÖµÊDz»Ò»ÑùµÄ£¬ÔÚFirefoxÖУ¬padding-leftĬÈÏֵΪ40px×óÓÒ£¬¶øIEÖÐΪ0£¬Ò»°ãÉèÖÃul{margin:0;padding:0;}¾ÍÄܽâ¾ö´ó²¿·ÖÎÊÌâ
·                            ¶Ô×ÖÌå´óСsmallµÄ¶¨Ò岻ͬ£¬FirefoxÖÐΪ13px£¬¶øIEÖÐΪ16px£¬²î±ðͦ´ó£¬Ò²Ö»ÄÜÉèÖÃΪ14pxÁËÊ£»(ÔÝʱûÓз¢ÏÖ)
·                            ²¢ÁÐÅÅÁеĶà¸öÔªËØ£¨Í¼Æ¬»òÕßÁ´½Ó£©µÄ´úÂëÖеĿոñºÍ»Ø³µ»áÔì³ÉÔªËØÖ®¼äµÄ¼ä϶£¬¶øÔÚfirefoxÖкÍÔÚIEÖÐÏÔʾÊDz»Ò»ÑùµÄ£¬IEÏÔʾ¿Õ¸ñ£¨Ô¼8px£©¡¢firefoxÏÔʾ¿Õ¸ñ£¨Ô¼4px£©
·                            ¶Ô²»¹æ·¶´úÂëµÄ¼æÈÝÇé¿ö²»Í¬£¬IEÖЩµôµÄ¹Ø±Õ·ûºÅ¶ÔÏÔʾ²»Ôì³ÉÓ°Ï죬¶øfirefoxÖоͻáÐγɴíÂҵIJ¼¾Ö£¬¶øÔÚieÖÐÓõ½µÄpaddingºÍmarginµÄ¸ºÖµ¶¼»á±»firefox½âÎöΪ0£¬Ò×Ôì³É²¼¾ÖµÄ»ìÂÒ£»£¨ÎÒ¾õµÃºÃÏñ¸ºÖµÔÚfirefoxÖÐÒ²ÊÇÓÐÏÔʾµÄ£©
·                            firefox¶ÔÓÚ³¤¸ß³ß´çµÄÑϸñ½âÎö»áÔì³ÉÓëÉèÖò»Æ¥Å䣨³¬³ö£©µÄͼƬ»ò±í¸ñ½«Ô­ÉèÖÃdiv³Å´ó£»
·                            £¡importantÊôÐÔ¿ÉÒÔÔÚ³ýIEä¯ÀÀÆ÷µÄÆäËûä¯ÀÀÆ÷ÖÐÆð×÷Óã¬Òò´ËÓÐÈËÀûÓÃÕâÖÖ²î±ðÀ´ÁîÒ»¸öCSS¼æÈݶàÖÖä¯ÀÀÆ÷£»
·             


Ïà¹ØÎĵµ£º

J2meÖÐcss½âÎö

 J2meÖÐcss½âÎö
 
   ×î½ü×öÊÖ»úä¯ÀÀÆ÷ÏîÄ¿ÖеÄCSSÄ£¿é¡£¶Ô½âÎöcssÓÐÁ˸öÕûÌåÈÏʶ¡£ÏÖ×ܽáÈçÏ£º
   Ê×ÏÈ£¬¼òµ¥µÄ½éÉÜÏÂCSS £º
CSS Ö¸²ãµþÑùʽ±í (Cascading Style Sheets)
CSS Óï·¨ÓÉÈý²¿·Ö¹¹³É£ºÑ¡ÔñÆ÷¡¢ÊôÐÔºÍÖµ£ºselector {property: value}
Ñ¡ÔñÆ÷ (selector) ͨ³£ÊÇÄãÏ£Íû¶¨ÒåµÄ ......

dz̸CSSÖÐmarginµÄÊôÐÔ¼°Ê¹Ó÷½·¨


ÏëÐÞ¸ÄÒ»ÏÂ×Ó×Ô¼ºµÄCSS£¬ÒòΪ²©¿Í±êÌâÕýºÃ°ÑÍøҳͼƬÉϵÄÎÄ×ÖÕýºÃµµÁËÒ»²¿·Ö£¬¿´ÆðÀ´ºÜ²»Ë¬¡£×îºóȷʵÊÇÓÉ“marginÃüÁî”À´¿ØÖƵģ¬ÓÚÊÇÉÏÍøѧϰÁËÒ»ÏÂ×ÓÕâ¸öµÄÓ÷¨¡£marginÔÚÖÐÎÄÖÐÎÒÃÇ·­Òë³ÉÍâ±ß¾à»òÕßÍâ²¹°×£¨±¾ÎÄÖÐÒýÓÃÍâ±ß¾à£©¡£ËûÊÇÔªËغÐÄ£ÐÍ£¨box model£©µÄ»ù´¡ÊôÐÔ¡£
Ò»¡¢marginµÄ»ù±¾ÌØÐÔ
marginÊô ......

cssÑùʽÏà¹Ø֪ʶС½á

¿ÉÒÔ·ÅÖÃÑùʽµÄµØ·½£ºÑùʽ±í£¬<style>ºÍstyle
Ñùʽ±íÊÇÒ»¸ö¶ÀÁ¢µÄÎļþ£¬¿ÉÒÔͨ¹ý<link>ÔªËØ»òÕßcssµÄ@importÓï¾ä°ÑËü¸½¼Óµ½Ä³¸öhtmlÎĵµÖУ¬<style>ÊÇÒ»¸öhtmlÔªËØ£¬¿ÉÒÔ°ÑËüÄÚǶÔÚhtmlÎĵµÖУ¬styleÊÇÒ»¸öÊôÐÔ£¬¿ÉÒÔÄÚÖÃÔÚÈκÎhtmlÔªËØÖС£
ÒªÏë°ÑÑùʽ±íÁ¬µ½htmlÎĵµÖУ¬ÒªÔÚhtmlÎĵµÖеÄ<head> ......

css¾ºÕù¹æÔò

¾ºÕù¹æÔò£ºcssÔÊÐí¶à´Î½«Í¬Ò»¸ö¹æÔò¸³Óèij¸öÔªËØ¡£²ãµþÅÅÐò¸ù¾Ý¹æÔòÖÐʹÓõÄÑ¡Ôñ·û½«¹æÔò»®·Ö6×飬¸ßÓÅÏȼ¶×éÀïµÄ¹æÔò»á¸²¸ÇµÍÓÅÏȼ¶×éÀïµÄ¹æÔò¡£ÆÕͨµÄÑ¡Ôñ·û»áÉèÖÃÎĵµµÄ×ÜÌåÑùʽ£¬¸ü¾ßÌåµÄÑ¡Ôñ·û»á¸²¸ÇÆÕͨѡÔñ·û£¬ÒÔΪÆäÌṩ¸ü¼ÓÌØÊâµÄÑùʽ
6¸öÑ¡Ôñ·ûȺ×飺
1.       ʹÓÃ!important¹æ ......

css³£ÓÃС¼Ç

×ÖÐÍ
ÎÄ×Ö顏É«
color: #000;
ÎÄ×Ö´óС
font-size: 8pt;
ÎÄ×Ö×Ö體
font-family: “arial”, dotum;
ÎÄ×Öб體
font-style: italic;
С×Ö體
font-variant: small-caps;
×Ö間¾à離
letter-spacing: 1pt;
Ðиß
line-height: 15px; (Òà¿É為°Ù·Ö±È)
ÎÄ×Ö´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ