¸Ä±äÒ³ÃæʹÓõÄCSSÎļþ£¬Ê¹ÍøÒ³½øÐв¼¾Ö»òÉ«µ÷µÈ¸Ä±ä
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>ÎÞ±êÌâÒ³</title>
<LINK href="../css/skin1.css" mce_href="css/skin1.css" rel="stylesheet" type="text/css">
<mce:script language="JavaScript" type="text/javascript"><!--
function changeSkin(n){
if(n==1)
document.styleSheets(0).href = "../css/skin1.css";
if(n==2)
document.styleSheets(0).href = "../css/skin2.css";
if(n==3)
document.styleSheets(0).href = "../css/skin3.css";
}
// --></mce:script>
</head>
<body>
<div>
[<A onclick="changeSkin(1)" style="cursor:hand" mce_style="cursor:hand">ÌìÀ¶°×ÔÆ</A>]
[<A onclick="changeSkin(2)" style="cursor:hand" mce_style="cursor:hand">·Ûºì»ØÒä</A>]
[<A onclick="changeSkin(3)" style="cursor:hand" mce_style="cursor:hand">ÐǹâÕÕÒ«</A>]
</div>
</body>
</html>
Ïà¹ØÎĵµ£º
CSSÊÇÒ»¸ö·Ç³£Ç¿´óµÄÍøÕ¾Éè¼Æ±ê¼ÇÓïÑÔ¡£
¡¡¡¡
¡¡¡¡ËäÈ»Äã¿ÉÄÜ»áÈÏΪ£¬ÈκÎÈ˶¼¿ÉÒÔתȥдCSS´úÂ룬µ«ÊÇΪÁËÈ·±£ÄúÔÚÕýÈ·µÄ¹ìµÀÉÏ£¬ÕâÀïÓÐÈçÏÂ8Ïî
CSSÔÔò£¬Ã¿¸öÍøÒ³Éè¼ÆʦӦ¸Ã×ñÑ¡£
¡¡¡¡
¡¡¡¡1¡¢W3CÑéÖ¤
¡¡¡¡
¡¡¡¡Èç¹ûÄãÊÇ1¸öÕýÔÚдCSS±àÂëµÄÈËÔ±£¬ÄÇô½¨ÒéÄúÿ´Î¶ÔÄúËù´´½¨µÄCSS´úÂë½øÐÐÑéÖ¤¡£µ«ÊÇ£¬ÓкܶàÉè
¼ÆÊ ......
CSS ÖÐÓиöÖØÒªµÄ¸ÅÄ¾ÍÊǺÐ×Óģʽ(Box model)¡£
ºÐ×ÓÀïÓÉÀïÖÁÍâÒÀ´ÎÊÇ£º
content ÄÚÈÝ(±ÈÈçÎı¾¡¢Í¼Æ¬µÈ)
padding Äڱ߾à
border ±ß¿ò
margin Íâ±ß¾à
paddingÊôÐÔÓÃÀ´ÉèÖÃÔªËØÄÚÈݵ½ÔªËر߿òµÄ¾àÀë¡£
  ......
µ±DIV+CSSƽµØÆð¾ªÀ×ͻȻ³öÏÖÔÚÍøÒ³Éè¼ÆÐÐÒµµÄʱºò£¬¹Ù·½¡¢Ãñ¼äÎÞ²»ÍƳ籸ÖÁ£¬·Â·ðTableÉè¼ÆµÄʱ´ú¾Í
ÒªÖսᣬÂíÉϾÍÒª²½ÈëDIV+CSSµÄʱ´ú£¬²»¶®µÃDIV+CSSÄ㶼²»ºÃÒâ˼˵Äã»áÍøÒ³Éè¼Æ£¬²»ÖªDIV+CSSÄ㶼²»
ºÃÒâ˼˵ÄãÊÇÕ¾³¤£¬ÄãÒª»¹ÊÇÓÃTABLEÀ´Éè¼ÆÕ¾µã£¬ÎÞÊý±ÉÒÄÖ®¹â¾ÍͶÉä¶øÀ´¡£
¡¡¡¡È»¶øDIV+CSSÕæµÄÓÐÕâôÉñÂð?¸ÃÔõà ......
Ϊµ¥¸ö±êÇ©¶¨Ò壺
br{
text-align: center;
color: #000000;
font-family:ËÎÌå;
}
Ϊbr±êÇ©Ö¸¶¨ÁË3¸öÑùʽÊôÐÔ£¬°üº¬¶ÔÆ䷽ʽ¡¢ÎÄ×ÖÑÕÉ«¼°×ÖÌå¡£
ÔÚÍøÒ³ÖÐÒ»¸öÿ¸öIDÖ»ÄÜʹÓÃÒ»´Î£¬È磺
<div id="main"></div>
ÔÚCSSÑùʽ±íÖУ¬IDÑ ......
Block element ¿é¼¶ÔªËØ
¹ËÃû˼Òå¾ÍÊÇÒÔ¿éÏÔʾµÄÔªËØ£¬¸ß¶È¿í¶È¶¼ÊÇ¿ÉÒÔÉèÖõġ£±ÈÈçÎÒÃdz£ÓõÄ<div>¡¢<p>¡¢<ul>ĬÈÏ״̬϶¼ÊÇÊôÓڿ鼶ԪËØ¡£¿é¼¶ÔªËرȽϰԵÀ£¬Ä¬ÈÏ״̬ÏÂÿ´Î¶¼Õ¼¾ÝÒ»Õû¸öÐУ¬ºóÃæµÄÄÚÈÝÒ²±ØÐëÔÙÐÂÆðÒ»ÐÐÏÔʾ¡£µ±È»·Ç¿é¼¶ÔªËØÒ²¿ÉÒÔͨ¹ýcssµÄdisplay:block;½«Æä¸ü¸Ä³É¿é¼¶ÔªËØ¡£´ËÍâ» ......