Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : css

¿í¶È×ÔÊÊÓ¦µÄdiv+cssµÄBOX

¿í¶È×ÔÊÊÓ¦µÄ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:relative;}
.box .box_tit .box_tit_1{position: absolute;top: 0; overflow: hidden; height: 100%;left: 0;   right:auto;width: 2px;}
.box .box_tit .box_tit_2{position: absolute;top: 0; overflow: hidden; height: 100%;left: 2px; right:2px;            }
.box .box_tit .box_tit_3{position: absolute;top: 0; overflow: hidden; height: 100%;left: auto;right:0;   width: 2px;} .box .box_tit{height:29px; line-height:29px; vertical-align:middle;}
.box .box_tit .box_tit_1{background:url("box.png") left 0px;width:2px;}
.box .box_tit .box_tit_2{background:url("box.png") left -30px; padding-l ......

CSS¶¨Î»

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½øÐж¨Î»£»2.¿Éͨ¹ýz-index½øÐвãµþ·Ö¼¶£»3.ÓÉÓÚÆ«ÒÆ¿ÉÄܻᵼÖ¿í¶È¡¢¸ß¶È´íλ£»½¨ÒéÉèÖÃÆ«ÒÆÁ¿ºó£¬ÖØÐÂÉèÖÃÔªËصÄwidth,heightÊôÐÔ£»4.ÓÉÓÚÔªËØÆ«ÒÆ£¬»áµ¼ÖºóÃæµÄÄÚÈݱ»¸²¸Ç£¬ËùÒÔÒªÏëÕý³£ÏÔʾºóÃæµÄÄÚÈÝ£¬ÐèÒª½«ºóÃæÄÚÈÝ×÷Ϊһ¸ö²ã£¬È»ºóÉèÖÃÕâ¸ö²ãµÄmargin-top:ÉÏ·½Æ«ÒÆÔªËصÄtopÖµ¡£
    absolute:1.ÍÑÀëÎĵµÁ÷£¬Í¨¹ýtop,right,bottom,left¶¨Î»£¬ËüÒÀÀµÆä×î½üµÄ¸¸¼¶ÔªËض¨Î»£¬µ±¸¸¼¶positionΪstaticʱ£¬absoluteÔªËؽ«ÒÔbody×ø±êÔ­µã½øÐж¨Î»£»2.¿Éͨ¹ýz-index½øÐвãµþ·Ö¼¶¡£
    fixed£º1.¹Ì¶¨¶¨Î»£¬ÆäËù¹Ì¶¨µÄ¶ÔÏóÊÇ¿ÉÊÓ´°¿Ú£¬¶ø²¢·ÇÊÇbody»òÊǸ¸¼¶ÔªËØ£»2.¿Éͨ¹ýz-index½øÐвãµþ·Ö¼¶¡£
    z-index£ºauto | number£»auto ×ñ´ÓÆ丸¶ÔÏóµÄ¶¨Î»£» numberΪÕûÊýÖµ£¬¿ÉÕý¡¢¸º£¬µ±È»ÖµÔ½´ó£¬²ãÔªË ......

CSSÍâ²ãBOX×Ô¶¯¼ÆËã¸ß¶ÈÎÊÌâ

¸ù¾ÝW3C¶¨Ò壬ûÓÐfloatÊôÐÔµÄÍâ²ãbox²»»á×Ô¶¯¼ÆËã¸ß¶È£¬Òª¼ÆËã¸ß¶È£¬±ØÐëÔÚÄÚ²ã×îºóÒ»¸öbox¼ÓÈëclear:both¡£
Opera¡¢netscape¡¢mozillaµÈ²»»á¼ÆËãÍâ²ãbox¸ß¶È£¬µ«ÊÇ΢Èíie6»á×Ô¶¯¼ÆËãÍâ²ã¸ß¶È¡£±ÈÈ磺
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<style>
.outer {
  width:600px;
  background:#000;
}
.inner1 {
  float:left;
  width:200px;
  height:100px;
  margin:5px;
  background:red;
}
.inner2 {
  float:left;
  width:200px;
  height:100px;
  margin:5px;
  background:yellow;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner1"></div>
& ......

css ×óÓÒMargin¼Ó±¶µÄÎÊÌâ

µ±div²ãΪfloatʱ£¬IE6ÖÐbox×óÓÒµÄmargin»á¼Ó±¶
±ÈÈ磺
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<style>
.outer {
  width:500px;
  height:200px;
  background:#000;
}
.inner {
  float:left;
  width:200px;
  height:100px;
  margin:5px;
  background:#fff;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner"></div>
<div class="inner"></div>
</div>
</body>
</html>
×óÃæµÄinnerµÄ×óÃæmarginÃ÷ÏÔ´óÓÚ5px¡£
Õâʱºò£¬¶¨ÒåinnerµÄdisplayÊôÐÔΪinline¡£ ......

CSS³£¼û¼æÈÝÐÔÎÊÌâ


DOCTYPE Ó°Ïì CSS ´¦Àí
Firefox: div ÉèÖà margin-left, margin-right Ϊ auto ʱÒѾ­¾ÓÖÐ, IE ²»ÐÐ
Firefox: body ÉèÖà text-align ʱ, div ÐèÒªÉèÖà margin: auto(Ö÷ÒªÊÇ margin-left,margin-right) ·½¿É¾ÓÖÐ
Firefox: ÉèÖà padding ºó, div »áÔö¼Ó height ºÍ width, µ« IE ²»»á, ¹ÊÐèÒªÓà !important ¶àÉèÒ»¸ö height ºÍ width
Firefox: Ö§³Ö !important, IE ÔòºöÂÔ, ¿ÉÓà !important Ϊ Firefox ÌرðÉèÖÃÑùʽ
div µÄ´¹Ö±¾ÓÖÐÎÊÌâ: vertical-align:middle; ½«ÐоàÔö¼Óµ½ºÍÕû¸öDIVÒ»Ñù¸ß line-height:200px; È»ºó²åÈëÎÄ×Ö£¬¾Í´¹Ö±¾ÓÖÐÁË¡£È±µãÊÇÒª¿ØÖÆÄÚÈݲ»Òª»»ÐÐ
cursor: pointer ¿ÉÒÔͬʱÔÚ IE Firefox ÖÐÏÔʾÓαêÊÖָ״£¬ hand ½ö IE ¿ÉÒÔ
Firefox: Á´½Ó¼Ó±ß¿òºÍ±³¾°É«£¬ÐèÉèÖà display: block, ͬʱÉèÖà float: left ±£Ö¤²»»»ÐС£²ÎÕÕ menubar, ¸ø a ºÍ menubar ÉèÖø߶ÈÊÇΪÁ˱ÜÃâµ×±ßÏÔʾ´íλ, Èô²»Éè height, ¿ÉÒÔÔÚ menubar ÖвåÈëÒ»¸ö¿Õ¸ñ¡£
ÔÚmozilla firefoxºÍIEÖеÄBOXÄ£ÐͽâÊͲ»Ò»Öµ¼ÖÂÏà²î2px½â¾ö·½·¨£º
div{margin:30px!important;margin:28px;}
×¢ÒâÕâÁ½¸ömarginµÄ˳ÐòÒ»¶¨²»ÄÜд·´£¬¾Ý°¢½ÝµÄ˵·¨!importantÕâ¸öÊôÐÔIE²»ÄÜʶ±ð£¬µ«±ðµÄä¯ÀÀÆ÷ ......

CSS·ÂÌÔ±¦Ê×Ò³µ¼º½Ìõ²¼¾ÖЧ¹û

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TAO BAO TEST 2</title>
<style>
body{ font-size:12px; text-align:center;  margin-top:30px; font-family:Verdana;}
div,img{margin:0; padding:0; border:0;}
ul,li{list-style-type: none; margin:0; padding:0; float:left; }
#info{ margin-left:auto; margin-right:auto;width:760px; text-align:left;}
#new{ margin-top:-12px;position: absolute;margin-left:-12px;}
#nav{ height:30px; width:610px; margin-left:auto; margin-right:auto;}
#nav li{margin-left:1px; height:30px;}
#nav li a{ display:block;float:left; text-decoration:none; background-image: url(http://www.zishu.cn/attachments/month_0605/r200652134132.gif);background-repeat: no-repeat; display:block; background-position:left top;}
#nav a sp ......
×ܼǼÊý:772; ×ÜÒ³Êý:129; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [105] [106] [107] [108] 109 [110] [111] [112] [113] [114]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ