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

css×Ô¶¯»»ÐÐ,·ÀÖ¹³ÅÆÆdiv

¶¯»»ÐÐÎÊÌâ,Õý³£×Ö·ûµÄ»»ÐÐÊDZȽϺÏÀíµÄ,¶øÁ¬ÐøµÄÊý×ÖºÍÓ¢ÎÄ×Ö·û³£³£½«ÈÝÆ÷³Å´ó,ͦÈÃÈËÍ·ÌÛ,ÏÂÃæ½éÉܵÄÊÇCSSÈçºÎʵÏÖ»»Ðеķ½·¨
¶ÔÓÚdiv,pµÈ¿é¼¶ÔªËØ
Õý³£ÎÄ×ֵĻ»ÐÐ(ÑÇÖÞÎÄ×ֺͷÇÑÇÖÞÎÄ×Ö)ÔªËØÓµÓÐĬÈϵÄwhite-space:normal,µ±¶¨ÒåµÄ¿í¶ÈÖ®ºó×Ô¶¯»»ÐÐ
html
<
id="wrap">Õý³£ÎÄ×ֵĻ»ÐÐ(ÑÇÖÞÎÄ×ֺͷÇÑÇÖÞÎÄ×Ö)ÔªËØÓµÓÐĬÈϵÄwhite-space:normal,µ±¶¨Òå< /div
>
css
#wrap{white-space:normal; width:200px; }
1.£¨IEä¯ÀÀÆ÷£©Á¬ÐøµÄÓ¢ÎÄ×Ö·ûºÍ°¢À­²®Êý×Ö,ʹÓÃword-wrap
: break-word ;»òÕßword-break:break-all;ʵÏÖÇ¿ÖƶÏÐÐ
#wrap{word-break:break-all; width:200px;}
»òÕß
#wrap{word-wrap:break-word; width:200px;}
<
id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111< /div
>
Ч¹û£º¿ÉÒÔʵÏÖ»»ÐÐ
2.£¨Firefoxä¯ÀÀÆ÷£©Á¬ÐøµÄÓ¢ÎÄ×Ö·ûºÍ°¢À­²®Êý×ֵĶÏÐÐ,FirefoxµÄËùÓа汾µÄûÓнâ¾öÕâ¸öÎÊÌâ,ÎÒÃÇÖ»ÓÐÈó¬³ö±ß½çµÄ×Ö·ûÒþ²Ø»òÕß,¸øÈÝÆ÷Ìí¼Ó¹ö¶¯Ìõ
#wrap{word-break:break-all; width:200px; overflow:auto;}
<
id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111< /div
>
Ч¹û£ºÈÝÆ÷Õý³££¬ÄÚÈÝÒþ²Ø
¶ÔÓÚtable
1.
(IEä¯ÀÀÆ÷)ʹÓà table-layout:fixed;Ç¿ÖÆtableµÄ¿í¶È,¶àÓàÄÚÈÝÒþ²Ø
< style="table-layout:fixed" width="200">
<>
<>abcdefghigklmnopqrstuvwxyz1234567890ssssssssssssss
<
/td >
<
/tr >
<
/table >
Ч¹û£ºÒþ²Ø¶àÓàÄÚÈÝ
2.(IEä¯ÀÀÆ÷)ʹÓÃ
table-layout:fixed;Ç¿ÖÆtableµÄ¿í¶È,ÄÚ²ãtd,th²ÉÓÃword-break : break-all;»òÕßword-wrap :
break-word ;»»ÐÐ
< width="200" style="table-layout:fixed;">
<>
<
width="25%" style="word-break : break-all; ">abcdefghigklmnopqrstuvwxyz
1234567890
<
/td >
<
style="word-wrap : break-word ;">abcdefghigklmnopqrstuvwxyz 1234567890
<
/td >
<
/tr >
<
/table >
Ч¹û£º¿ÉÒÔ»»ÐÐ
3.
(IEä¯ÀÀÆ÷)ÔÚtd,thÖÐǶÌ×div,pµÈ²ÉÓÃÉÏÃæÌáµ½µÄdiv,pµÄ»»Ðз½·¨
4.(Firefoxä¯ÀÀÆ÷)ʹÓÃ
table-layout:fixed;Ç¿ÖÆtableµÄ¿í¶È,ÄÚ²ãtd,th²ÉÓÃword-break : break-all;»òÕßword-wrap :
break-word ;»»ÐУ¬Ê¹ÓÃoverflow:hidden;Òþ²Ø³¬³öÄÚÈÝ£¬ÕâÀïoverflow:auto;


Ïà¹ØÎĵµ£º

CSS¹«ÓÃÎļþ

ÓÉÓÚ¸÷ä¯ÀÀÆ÷µÄĬÈÏCSSÑùʽ²»Ò»Ñù£¬ÎÒÃDZØÐëдһ¸öCSS ResetͳһÆðÀ´¡£
ͨ³£ÎÒµÄ×ö·¨ÊÇÔÚcommon.cssÀïдȫ¾Ö¿ØÖÆ£¬ÕâÀïÃæÒ²°üÀ¨headerºÍfooter£¬ÆäËüCSSÎļþ¾Íͨ¹ý@import url(”common.css”);ÒýÓá£
body{padding:10px;margin:0;background:#fff;font-size:12px;line-height:14px;color:#333;font-family:Ari ......

CSSʵÏÖÔ²½ÇµÄ 25 ÖÖ¼¼ÇÉ·ÖÏí

Ô­ÎĵØÖ·£ºhttp://www.devwebpro.com/25-rounded-corners-techniques-with-css/
* This post is regularly updated. *
Rounded corners is one of the most popular and frequently requested
CSS techniques even the father of internet Google
also launch the rounded corners style markup
with her Google Ad ......

³ÉΪһÁ÷CSSÉè¼ÆʦµÄ8´ó¼¼ÇÉ

CSSÊÇÒ»¸ö·Ç³£Ç¿´óµÄÍøÕ¾Éè¼Æ±ê¼ÇÓïÑÔ¡£
¡¡¡¡
¡¡¡¡ËäÈ»Äã¿ÉÄÜ»áÈÏΪ£¬ÈκÎÈ˶¼¿ÉÒÔתȥдCSS´úÂ룬µ«ÊÇΪÁËÈ·±£ÄúÔÚÕýÈ·µÄ¹ìµÀÉÏ£¬ÕâÀïÓÐÈçÏÂ8Ïî
CSSÔ­Ôò£¬Ã¿¸öÍøÒ³Éè¼ÆʦӦ¸Ã×ñÑ­¡£
¡¡¡¡
¡¡¡¡1¡¢W3CÑéÖ¤
¡¡¡¡
¡¡¡¡Èç¹ûÄãÊÇ1¸öÕýÔÚдCSS±àÂëµÄÈËÔ±£¬ÄÇô½¨ÒéÄúÿ´Î¶ÔÄúËù´´½¨µÄCSS´úÂë½øÐÐÑéÖ¤¡£µ«ÊÇ£¬ÓкܶàÉè
¼ÆÊ ......

DivCSSÍøÒ³²¼¾ÖÖÐCSSÎÞЧµÄÊ®¸ö³£¼ûÔ­Òò

    ÎÒÃÇ´Ó52CSS.comÖÐѧϰDivCSSÍøÒ³²¼¾ÖµÄ֪ʶ£¬¿ÉÊÇW3C validationÓÐʱÄÑÒÔ²Ù×÷£¬µ«ÓÃËüÄã¿ÉÒԲ鿴ÓÉ°æÃæÉè¼ÆÒýÆðµÄ²î´í¡£ÑéÖ¤³ÌÐòÅ׳ö´óÁ¿²î´íºÍ¾¯¸æ£¬ËµÃ÷ÄãµÄXHTMLÉÐδÍêÉÆ£¬¿ÉÄÜÎÞ·¨ÔÚ²»Í¬ä¯ÀÀÆ÷Éϱ£³ÖÒ»Ö¹¦ÄÜ¡£ÏÂÃæÊ®¸öϸ΢µÄʧЧÎÊÌâÄÑסÁË´óÅú³ÌÐòÔ±£¬±¾Îľ͸æËßÄãÈçºÎ½â¾ö¡£ÔÚ±¾ÎÄ¿ªÊ¼Ç°½éÉÜһР......

8¸ö²»¼æÈÝIE 8µÄCSSÑùʽд·¨


Internet Explorer 8Ô¤ÉèÊÇÒÔCSS 2.1Ϊ±ê×¼£¬²¢ÐÞÕýÁËÐí¶àInternet Explorer 7µÄCSS Bug£¬ÕâÒâζ×ÅÓÐÒ»²¿·ÝÒÔÍùÒÀ¾ÝIE 7ËùÉè¼ÆµÄÍøÒ³£¬
ÔÚIE 8ÉϵijÊÏÖ»áÓÐËù³öÈ룬ËùÐÒ°ÝIE 7ÏàÈݼìÊÓ¹¦ÄÜËù´Í£¬Ä¿Ç°ÒòʹÓÃIE 8¶øµ¼Ö°æÃæ´íÎóµÄÍøÕ¾²¢²»¶à¡£
µ«Ò»ÖµÒÀÀµIE 7ÏàÈݼìÊÓ¹¦Äܲ¢·Ç³¤¾ÃÖ®¼Æ£¬¾¡Ô罫ÍøÕ¾ÐÞ¸ÄΪIE 8ÏàÈݲÅÊdz¤¾Ã ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ