CSSÖг£ÓõÄʵÀý
¼¸¸öcssÔªËØµÄ¼òµ¥½âÊÍ div ul dl dt oldiv£¬Õâ¸öºÜ³£¼û£¬¿é¼¶ÔªËØ£¬div¾¡Á¿ÉÙÓ㬺ÍtableÒ»Ñù£¬Ç¶Ì×Ô½ÉÙÔ½ºÃ
ol ÓÐÐòÁÐ±í¡£
<ol>
<li>……</li>
<li>……</li>
<li>……</li>
</ol>
±íÏÖΪ£º
1……
2……
3……
ul ÎÞÐòÁÐ±í£¬±íÏÖΪliÇ°ÃæÊÇ´óÔ²µã¶ø²»ÊÇ123
<ul>
<li>……</li>
<li>……</li>
</ul>
ºÜ¶àÈËÈÝÒ׺öÂÔ dl dt ddµÄÓ÷¨
dl ÄÚÈÝ¿é
dt ÄÚÈÝ¿éµÄ±êÌâ
dd ÄÚÈÝ
¿ÉÒÔÕâôд£º
<dl>
<dt>±êÌâ</dt>
<dd>ÄÚÈÝ1</dd>
<dd>ÄÚÈÝ2</dd>
</dl>
dt ºÍddÖпÉÒÔÔÙ¼ÓÈë ol ul liºÍp
Àí½âÕâЩÒÔºó£¬ÔÚʹÓÃdiv²¼¾ÖµÄʱºò£¬»á·½±ãºÜ¶à£¬w3cÌṩÁ˺ܶàÔªËØ¸¨Öú²¼¾Ö
´úÂ뾫¼ò
¡¡¡¡Ê¹ÓÃDIV CSS²¼¾Ö£¬Ò³Ãæ´úÂ뾫¼ò£¬ÕâÒ»µãÏàÐŶÔXHTMLÓÐËùÁ˽âµÄ¶¼ÖªµÀ¡£´úÂ뾫¼òËù´øÀ´µÄÖ±½ÓºÃ´¦ÓÐÁ½µã£ºÒ»ÊÇÌá¸ßspiderÅÀÐÐЧÂÊ£¬ÄÜÔÚ×î¶ÌµÄʱ¼äÄÚÅÀÍêÕû¸öÒ³Ãæ£¬ÕâÑù¶ÔÊÕ¼ÖÊÁ¿ÓÐÒ»¶¨ºÃ´¦;¶þÊÇÓÉÓÚÄܸßЧµÄÅÀÐУ¬¾Í»áÊܵ½spiderϲ»¶£¬ÕâÑù¶ÔÊÕ¼ÊýÁ¿ÓÐÒ»¶¨ºÃ´¦¡£
¡¡¡¡±í¸ñµÄǶÌ×ÎÊÌâËÑË÷ÒýÇæÒ»°ã²»×¥È¡Èý²ãÒÔÉϵıí¸ñǶÌ×£¬ÕâÒ»µãһֱûÓеõ½ËÑË÷ÒýÇæ¹Ù·½µÄ֤ʵ¡£Îҵļ¸ÏîʵÑé½á¹ûûÓÐÍêÈ«³öÀ´£¬µ«¸ù¾ÝÄ¿Ç°ÕÆÎÕµÄÇé¿öÀ´¿´£¬spiderÅÀÐÐTable²¼¾ÖµÄÒ³Ãæ£¬Óöµ½¶à²ã±í¸ñǶÌ×ʱ£¬»áÌø¹ýǶÌ×µÄÄÚÈÝ»òÖ±½Ó·ÅÆúÕû¸öÒ³Ãæ¡£
¡¡¡¡Ê¹ÓÃTable²¼¾Ö£¬ÎªÁË´ïµ½Ò»¶¨µÄÊÓ¾õЧ¹û£¬²»µÃ²»Ì×Óöà¸ö±í¸ñ¡£Èç¹ûǶÌ׵ıí¸ñÖÐÊǺËÐÄÄÚÈÝ£¬spiderÅÀÐÐÊ±Ìø¹ýÁËÕâÒ»¶ÎûÓÐץȡµ½Ò³ÃæµÄºËÐÄ£¬Õâ¸öÒ³Ãæ¾Í³ÉÁËÏàËÆÒ³Ãæ¡£ÍøÕ¾Öйý¶àµÄÏàËÆÒ³Ãæ»áÓ°ÏìÅÅÃû¼°ÓòÃûÐÅÈζȡ£
¡¡¡¡¶øDIV CSS²¼¾Ö»ù±¾Éϲ»»á´æÔÚÕâÑùµÄÎÊÌ⣬´Ó¼¼Êõ½Ç¶ÈÀ´Ëµ£¬XHTMLÔÚ¿ØÖÆÑùʽʱҲ²»ÐèÒª¹ý¶àµÄǶÌס£ËÑË÷ÒýÇæÓÅ»¯¼°ÓªÏú¶¼ÊǷdz£ÓÐÀûµÄ¡£ËÑË÷ÒýÇæ±íʾÅÅÃû¹æÔò»áÇãÏòÓÚ·ûºÏW3C±ê×¼µÄÍøÕ¾»òÒ³Ãæ£¬µ«ÊÂʵ֤Ã÷ʹÓÃXTHML¼Ü¹¹µÄÍøÕ¾ÅÅÃû×´¿öÒ»°ã¶¼²»´í¡£ÕâÒ»µã»òÐí»áÓÐÕùÒ飬µ«樂˼Êñ±¾È˱£³ÖÕâÑùµÄ¹Ûµã£¬ÓÐÒìÒéÕß¿ÉÒÔÄÃÈý×éÒÔÉÏ»ù±¾Í¬µÈÖÊÁ¿µÄÍøÕ¾¶Ô±È¹Û²ì¡£ÄÚÈÝÀ´×ÔÖйúÕ¾³¤×ÊÑ¶Íø(www.chinahtml.com)
¡¡¡¡ÎÒÏ룬ÕâÑùµÄÇé¿ö¿ÉÄܲ»ÊÇÅÅÃû¹æÔò£¬×î´óµÄ¿ÉÄÜ»¹ÊÇspiderÅÀÐÐÍøÕ¾Ê±£¬³öÏÖÒÔÉϲîÒìµ¼ÖÂÊÕ¼ÖÊÁ¿µÄ²»Í¬¡£
¡¡¡¡±Ï¾¹ÁÎʤÓÚÎÞ£¬½¨Ò齨վ»ò¸Ä°æµÄÅóÓÑÃÇ£¬
Ïà¹ØÎĵµ£º
ÔÚµ±½ñweb2.0ʱ´ú,ÔÚÉè¼ÆÍøÒ³µÄʱºò´ó¼Ò¶¼»áʹÓÃdiv+css½øÐв¼¾Ö,Óеã¾Í²»Óöà˵ÁË,×ÔÈ»ÓкܶàºÃ´¦ÁË,ÖÁÉÙ»á±ÈÓÃtable²¼¾ÖÉÙЩ´úÂë,¶øÓÃdiv²¼¾ÖÒ²ÓÐËûÃǵIJ»·½±ãÖ®´¦,¾ÍÊDZȽϸ´ÔÓ,ÓÈÆäÊǶà¸ödivÔÚÒ»ÐÐÏÔʾ,¶à¸öä¯ÀÀÆ÷¼æÈݵȵÈ,ËùÒÔ³õѧÕß»¹ÊǾ¡Á¿ÓÃtable²¼¾Ö,´ýÊìÁ·ÁËÔÚÓÃdiv.
ÏÖÔÚ˵µÄÊÇDIV+CSSÖÐclear:bothµÄ×÷ÓÃ,ÏÈ¿´ ......
Çø±ð²»Í¬ä¯ÀÀÆ÷µÄCSS hackд·¨£º
Çø±ðIE6ÓëFF£º
background:orange;*background:blue;
Çø±ðIE6ÓëIE7£º
background:green !important;background:blue;
Çø±ðIE7ÓëFF£º
&nb ......
×î½ü,¾³£ÓÐÅóÓÑÎÊÎÒһЩ¹¤×÷ÖÐÓöµ½µÄCSSÎÊÌâ¡£ËûÃÇ×ÜÊDz»ÄܺܺõĿØÖÆCSS£¬Ó°ÏìCSSµÄЧÂÊ·¢»Ó¡£ÎÒÀ´·ÖÎö×ܽáһϴíÎóËùÔÚ£¬°ïÖú´ó¼Ò¸ü¼ÓÈÝÒ×ʹÓÃCSS¡£
±¾ÎÄ×ܽáÁËÎÒ¿ªÊ¼Ê¹ÓÃCSS²¼¾Ö·½·¨ÒÔÀ´ËùÓеļ¼ÇɺͼæÈÝ·½°¸£¬ÎÒÔ¸Òâ°ÑÕâЩÓëÄã·ÖÏí£¬ÎÒ»áÖØµã½âÊÍһЩÐÂÊÖÈÝÒ×·¸µÄ´íÎó(°üÀ¨ÎÒ×Ô¼ºÒ²·¸¹ýµÄ)£¬Èç¹ûÄãÒѾÊÇCSS¸ßÊÖ£¬ÕâÐ ......
JavaScript´úÂë
<mce:script type="text/javascript"><!--
function imageOver(e) {
e.style.border="1px solid red";
}
function imageOut(e) {
e.style.borderWidth=0;
}
// --></mce:script>
<img src="phplamp.gif" onmouseover="imageOver(this)" onmo ......
1. CSS Reset/ÖØÖÃ
ÄãÒ²ÐíÐèÒªÏÈÁ˽âʲôÊÇcssÖØÖá£È»ºóÔõôÑùдcssÖØÖÃÄØ¡£
Äã¿ÉÒÔcopy Eric Meyer Reset, YUI Reset»òÆäËücss reset, µ«Äã½ÓÏÂÀ´Ó¦¸Ã¸ù¾ÝÄãµÄÏîÄ¿¸Ä³ÉÄã×Ô¼ºµÄreset.
²»ÒªÊ¹ÓÃ* { margin: 0; padding: 0; } ¡£ÎÒ¸öÈ˺ܰ®Óã¬Ô×÷ÕßÌᵽʹÓÃÕâ¾ä²¢²»ÊÊÓÃÒ»Ð©ÔªËØ±ÈÈ絥ѡ°´Å¥¡£²»¹ý°³²©¿ÍÀïÃæÒ²Ã»Óе¥ ......