9¸öÓÀ²»¹ýʱµÄcssÈýÀ¸²¼¾Ö
ÎÒϲ»¶3À¸²¼¾ÖµÄÍøÒ³Éè¼Æ£¬µ«ÊÇ3À¸²¼¾ÖÏà¶ÔÀ´Ëµ¾Í±È½Ï¸´ÔÓ£¬ÓÐЩÄÑÒÔ¿ØÖÆ£¬¾¡¹ÜʱÏÂÕý»ðµÄWeb2.0ËÆºõºÜÉÙ²ÉÓÃ3À¸²¼¾Ö¡£µ«Ã»¹ØÏµ£¬ÎÒÃÇÊÇ·Ç·Ç·ÇÖ÷Á÷¡£
Ê×ÏÈ£¬ÈκÎÒ»¸ö²¼¾Öͨ³£¶¼ÓÐheaders, navigation bars, content containers,
sidebarsÒÔ¼°
footers¡£ÎÒÃÇÔÚÉè¼ÆÈýÀ¸Ö÷ÌâµÄʱºò£¬×îÖØÒªµÄÄ¿µÄ¾ÍÊÇ·¢»ÓÆä×î´óµÄÁé»îÐÔºÍ×ÔÊÊÓ¦¸ß¶È£¬ÕâÑù²Å»á¿´ÉÏÈ¥¸ü¼ÓÃÀ¹Û¡£ÏÂÃæ9¸öÈýÀ¸CSS²¼¾Ö½«´Ó¶à¸ö
·½ÃæÀ´ÊµÏÖ×îºÃµÄ²¼¾Ö·½·¨£¬²¢¶¼¼æÈÝIEºÍFF¡£
Á½¸ö¹Ì¶¨À¸ºÍÒ»¸ö¿É±äÀ¸
Ò»¸ö¾«ÖµÄ3À¸²¼¾Ö¼¼ÇÉʾÀý
1. #leftcontent {
position: absolute;
left:10px;
top:50px;
width:200px;
}
2. #centercontent {
margin-left: 199px;
margin-right:199px;
margin-left: 201px;
margin-right:201px;
}
HTML>body #centercontent {
margin-left: 201px;
margin-right:201px;
}
3. #rightcontent {
position: absolute;
right:10px;
top:50px;
width:200px;
}
ʹÓÃ100%¸ß¶È
1. #left { float: left; width: 155px; padding: 5px; position: relative; /*** IE needs this ***/ }
2. #right { float: right; width: 110px; padding: 5px; position:
relative; /*** IE needs this ***/ margin-right: -120px; /** This
negative margin-right value is the same as the right column width
(width + padding). ***/ position: relative; /*** IE needs this ***/ }
3. #content { float: right; margin-right: -165px; /*** Same l
Ïà¹ØÎĵµ£º
Õâ¶Îʱ¼äÔÚѧϰcss£¬×ܽáÁËһЩ¼¼ÇÉÀ´ºÍ´ó¼Ò·ÖÏíÏ£º
¡¡¡¡1¡¢Ê¹Óà line-height ´¹Ö±¾ÓÖÐ
¡¡¡¡line-height:24px;
¡¡¡¡Ê¹Óù̶¨¿í¶ÈµÄÈÝÆ÷²¢ÇÒÐèÒªÒ»Ðд¹Ö±¾ÓÖÐʱ£¬Ê¹Óà line-height ¼´¿É(¸ß¶ÈÓ븸²ãÈÝÆ÷Ò»ÖÂ)£¬¸ü¶àµÄ´¹Ö±¾ÓÖÐ×ܽá¿ÉÒÔ¿´ÕâÀï¡£
¡¡¡¡2¡¢Çå³ýÈÝÆ÷¸¡¶¯
¡¡¡¡#main {
¡¡¡¡overflow:hidden;
¡¡¡¡}
......
1¡¢ÁбíºáÅÅ
½«liµÄÑùʽÉèÖÃΪ
li {display:block;float:left;}
2¡¢È¥³ýͼƬ´¹Ö±·½ÏòµÄ¿Õ°×
×îºÃµÄ×ö·¨ÊÇΪimg ¼ÓÉÏ vertical-alignÊôÐÔ£¬ÕâÑù¾Í¿´²»µ½¿Õ°×ÁË¡£
......
css¿ØÖÆÎ»Öãº
´¿Êý×Ö
el.style.posLeft = 0;
el.style.posTop = 0;
Êý×Ö+µ¥Î»
el.style.left = "0px";
el.style.top = "0px";
css¿ØÖÆÔªËصÄÑùʽ£º
document.getElementById("para").style.fontWeight ="bold";
»ò£¨ÆäËûÒ²ÊÇÕâÑù£©£º
document.getElementById("para").className ="strong"; ......
ƽʱÎÒÃÇÔÚä¯ÀÀÍøÒ³µÄʱºò£¬³£³£¿´¼ûµ¼º½À¸ÊǶ¯Ì¬µÄ£¬ÆäʵÎÒÃÇ¿ÉÒÔͨ¹ýcssÑùʽ±íµÄ¶¨Òå¾Í¿ÉÒÔÍê³É¡£
Ê×ÏÈÎÒÃÇ¿´Ò»ÏÂcss´úÂ룺
#nav {
width:900px;
margin:0 auto;
background:#E1F4FD;
}
#nav li {
float:left;
font-size:14px;
}
#nav li a {
color:#000000;
......
ÔÚ¹úÄÚÍøÕ¾ÖУ¬°üÀ¨Èý´óÃÅ»§£¬ÒÔ¼°“ÒýÁì”ÖйúÍøÕ¾Éè¼Æ³±Á÷µÄÀ¶É«ÀíÏ룬ChinaUIµÈ¶¼ÊÇʹÓÃÁËpx×÷Ϊ×ÖÌ嵥λ¡£Ö»ÓаٶȺôõ×öÁ˸ö¿Éµ÷µÄ±íÂÊ¡£¶øÔÚ´óÑó±Ë°¶£¬¼¸ºõËùÓеÄÖ÷Á÷Õ¾µã¶¼Ê¹ÓÃem×÷Ϊ×ÖÌ嵥룬Ҳ¾ÍÊǿɵ÷µÄ¡£Ã»´í£¬px±Èem¸ü¼ÓÈÝÒ×ʹÓ㬴󲿷ֶÁÕß²»ÖªµÀemΪºÎÎï»òÕßËüÏ൱ÓÚ¶àÉÙpx¡£¹úÍâÈËÊ¿Èç´ËÖØÊÓÍøÕ ......