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:Arial;}
form,ul,ol,h1,h2,h3,h4,h5,h6,p{margin:0;padding:0;list-style:none;}
input,textarea,select,button{font-size:12px;}
img{border:none;}
address,cite,small{color:#999;font-style:normal;font-size:12px;}
a{color:#09c;text-decoration:none;}
a:hover{text-decoration:underline;}
#header{...}
#footer{...}
Ïà¹ØÎĵµ£º
Ò»×éǶÌ×Ñ¡ÔñÆ÷µÄʵ¼ÊÌØÐÔ¿ÉÒÔ¼ÆËã³öÀ´¡£»ù±¾µÄ£¬Ê¹ÓÃIDÑ¡ÔñÆ÷µÄÖµÊÇ100£¬Ê¹ÓÃclassÑ¡ÔñÆ÷µÄÖµÊÇ10£¬Ã¿¸öhtmlÑ¡ÔñÆ÷µÄÖµÊÇ1¡£
ËüÃÇ¼ÓÆðÀ´¾Í¿ÉÒÔ¼ÆËã³öÌØÐÔµÄÖµ¡£
pµÄÌØÐÔÊÇ1£¨Ò»¸öhtmlÑ¡ÔñÆ÷£©
div pµÄÌØÐÔÊÇ2£¨Á½¸öhtmlÑ¡ÔñÆ÷£©
.treeµÄÌØÐÔÊÇ10£¨1¸öclassÑ¡ÔñÆ÷£©
div p.treeµÄÌØÐÔÊÇ1+1+10=12£¬£¨Á½¸öhtmlÑ¡ÔñÆ÷ ......
css
clearfix(Õë¶Ô»ðºüheight:autoÎÞЧ½â¾ö·½°¸)
FirefoxµÈ·ûºÏW3C±ê×¼µÄä¯ÀÀÆ÷ÖУ¬Èç¹ûÓÐÒ»¸öDIV×÷ΪÍⲿÈÝÆ÷£¬ÄÚ²¿µÄDIVÈç¹ûÉèÖÃÁËfloatÑùʽ£¬ÔòÍⲿµÄÈÝÆ÷DIVÒòΪÄÚ²¿Ã»ÓÐclear£¬µ¼Ö²»Äܱ»³Å¿ª¡£
Àý£º
<div style=" border:2px solid #0CC; width:600px;" >
<div style="
wi ......
±ÈÈ磺
<div class="row" id="form_domain_container">
<label for="domain">ÓòÃû:</label>
<input name="domain" value="<{$do->domain_name|escape}>" type="text" id="domain" size="35" maxlength= ......
:hoverÊÇÎÒÃÇÔÚCSSÉè¼ÆÖÐ×î³£ÔËÓõÄαÀàÖ®Ò»£¬Ðí¶àѤÀöЧ¹ûµÄʵÏÖÀë²»¿ªÎ±Àà:hover£¬±ÈÈçÎÒÃdz£¼ûµÄ´¿CSS²Ëµ¥¡¢Ïà²áЧ¹ûµÈµÈ¡£
»òÐíÓÃÁËÕâô¾ÃµÄαÀà:hover£¬»¹Óв¿·ÖÅóÓÑ»¹²»ÍêÈ«Á˽âhoverµÄ¹æÔò£º
ÔÚCSS1ÖдËαÀà½ö¿ÉÓÃÓÚa¶ÔÏó¡£ÇÒ¶ÔÓÚÎÞhrefÊôÐÔ£¨ÌØÐÔ£©µÄa¶ÔÏ󣬴ËαÀ಻·¢Éú×÷Óá£
ÔÚCSS2ÖдËαÀà¿ÉÒÔÓ¦ÓÃÓÚÈκζÔÏ ......
display Property Values
ValueDescription
none
The element will generate no box at all
block
The element will generate a block box (a line break before and after the element)
inline
The element will generate an inline box (no line break before or after the element). This is default
inline-blo ......