10¸ö·Ç³£ÓÐÓõÄCSS¼¼ÇÉ
1. ½«ÍøÒ³»òÔªËØ¾ÓÖÐ
HTML£º
<div class="wrap">
</div><!-- end wrap -->
CSS£º
.wrap { width:960px; margin:0 auto;}
2.Sticky Footer (ÈÃÒ³½ÅÓÀÔ¶Í£¿¿ÔÚÒ³Ãæµ×²¿£¬¶ø²»ÊǸù¾Ý¾ø¶ÔλÖÃ)
HTML£º
<div id="wrap">
<div id="main" class="clearfix">
</div>
</div>
<div id="footer">
</div>
CSS£º
* { margin:0; padding:0; }
html, body, #wrap { height: 100%; }
body > #wrap {height: auto; min-height: 100%;}
#main { padding-bottom: 150px; } /* must be same height as the footer */
#footer {
position: relative;
margin-top: -150px; /* negative value of footer height */
height: 150px;
clear:both;}
/* CLEAR FIX*/
.clearfix:after {content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;}
.clearfix {display: inline-block;}
/* Hides from IE-mac */
* html .clearfix { height: 1%;}
.clearfix {display: block;}
/* End&nb
Ïà¹ØÎĵµ£º
¿í¶È×ÔÊÊÓ¦µÄdiv+cssµÄBOX
²Î¿¼:
http://space.cnblogs.com/group/topic/3617/
http://www.dynamicdrive.com/style/layouts/item/css-left-and-right-frames-layout/ Ò»¡¢Ð§¹û£º ¶þ¡¢Ëزģº Èý¡¢´úÂ룺 <style type="text/css">
.box{}
.box .box_tit{position:rela ......
1.¶¨Î»µÄ¶¨Òå
CSSÖж¨Î»ÓÃposition:static|relative|absolute|fixedÀ´ÊµÏÖ
static:1.Õý³£Á÷ÏÔʾ£»2.²»ÄÜͨ¹ýz-index½øÐвãµþ·Ö¼¶£»3.¿ÉÉèÖÃwidth,height£»4.ÉèÖÃtop,right,bottom,leftÎÞЧ
relative:1.²»ÍÑÀëÎĵµÁ÷£¬²Î¿¼×ÔÉíµÄ¾²Ì¬Î»Öã¬Í¨¹ýtop,right,bottom,left½øÐ ......
1.document.formName.item("itemName") ÎÊÌâ
˵Ã÷:IEÏÂ,¿ÉÒÔʹÓÃdocument.formName.item("itemName")»òdocument.formName.elements["elementName"];FirefoxÏÂ,Ö»ÄÜʹÓÃdocument.formName.elements["elementName"].
½â¾ö·½·¨:ͳһʹÓÃdocument.formName.elements["elementName"].
2.¼¯ºÏÀà¶ÔÏóÎÊÌâ
˵Ã÷:IEÏÂ,¿ÉÒÔʹÓÃ() ......
<div style="padding-top:5px;width:200px;height:15px;background-color:#ffeeee"> test </div>
ÒÔÉÏ´úÂëÔÚIEÖкÍfirefox»áÓв»Í¬µÄЧ¹û.×îÖ÷ÒªÔÒòÊÇfirefox½âÊÍpadding-topÓëIEµÄЧ¹û²»Í¬
fixfox¶ÔDIV×ܸ߶ÈÊÇpadding-top+heightµÄ,¶øIEÖÐ,padding-topÊǰüº¬ÔÚheightÖеÄ,
Òª½â¾öÕâÒ»¸öì¶Ü,¿ÉÒÔÀûÓÃ!imp ......
1.idÑ¡ÔñÆ÷
idÑ¡ÔñÆ÷µÄÃüÃûÓ¦¼á³ÖÌåÏÖÎĵµµÄ½á¹¹ºÍλÖá£
Èç:#header¡¢#footer¡¢#left µÈ
2.classÑ¡ÔñÆ÷
classÑ¡ÔñÆ÷µÄÃüÃûÓ¦¸ÃÌåÏÖÃû³ÆµÄÑùʽÃèÊöÐÔ¡£
È磺.red¡¢.underline µÈ
3.¶ÔÓÚÄ£¿éµÄÍâΧ½á¹¹ÔªËØ×îºÃÓÃidÊôÐÔ£¬ÄÚ²¿ÔªËØ¿ÉÒÔ¶¨ÒåclassÊôÐÔ£¬
ÒòΪÍâΧµÄ½á¹¹Ò»°ãʽΨһµÄ¡£¶øÄÚ²¿µÄÔªËØ¿ÉÄÜ»á³öÏÖÖØ¸´¡£
ÁíÍ ......