Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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

´«ÖDz¥¿Íѧϰ×ܽá CSS²ãµþÑùʽ±í

CSS(Cascading Style Sheets)²ãµþÑùʽ±í×÷ÓÃÊǽ«ÍøÒ³ÄÚÈݺÍÏÔʾÑùʽ½øÐзÖÀ룬Ìá¸ßÁËÏÔʾ¹¦ÄÜ¡£
CSS´úÂë¸ñʽ£º
       Ñ¡ÔñÆ÷Ãû³Æ { ÊôÐÔÃû£ºÊôÐÔÖµ£»ÊôÐÔÃû£ºÊôÐÔÖµ£»……}
Ñ¡ÔñÆ÷£¨¶Ô²»Í¬µÄHTML±êÇ©½øÐпØÖÆ£¬²¢¸³Óè¸÷ÖÖÑùʽÉùÃ÷£¬¼´¿ÉʵÏÖ¸÷ÖÖЧ¹û£©£º
  ±êÇ©Ñ¡ÔñÆ÷£º
Àý£º<style type ="text/css">
h1{
¡¡color:red;
¡¡font-size:25px;
}
</style>
ÀàÑ¡ÔñÆ÷£¨ÔÚ±êÇ©Öж¨ÒåclassÊôÐÔ²¢¸³Öµ¡£Í¨¹ý±êÇ©Ãû.classÖµ¶Ô¸Ã±êÇ©½øÐÐÑùʽÉèÖã¬Ïàͬ±êÇ©ÉèÖò»Í¬ÑùʽµÄʱºò£¬ÓÃclass½øÐÐÇø·Ö¡£²»Í¬±êÇ©½øÐÐÏàͬÉèÖõÄʱºò£¬ÓÃclass½øÐÐͳһ¶¨Ò壩
Àý£º<style type="text/css">
                     .title{
                            color:blue;
             &nbs ......

CSS IDÄÜÑ¡ÔñÈÝÆ÷ÄÚµÄÔªËØ£¬À಻ÄÜ

±ÈÈ磺
<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="64" /><br />
<{include file='lib/error.tpl' error=$do->getError('domain_name')}>
</div>
ÔÚCSSÖÐÉèÖÃÊôÐÔ¿ÉÒÔ£º
#form_domain_container input{}
µ«²»¿ÉÒÔ£º
.row input{}
......

cssαÀàhover ie6bug£¬½Ò¿ªIE6ÏÂhover²»ÏÔʾԭÒò

:hoverÊÇÎÒÃÇÔÚCSSÉè¼ÆÖÐ×î³£ÔËÓõÄαÀàÖ®Ò»£¬Ðí¶àѤÀöЧ¹ûµÄʵÏÖÀë²»¿ªÎ±Àà:hover£¬±ÈÈçÎÒÃdz£¼ûµÄ´¿CSS²Ëµ¥¡¢Ïà²áЧ¹ûµÈµÈ¡£
»òÐíÓÃÁËÕâô¾ÃµÄαÀà:hover£¬»¹Óв¿·ÖÅóÓÑ»¹²»ÍêÈ«Á˽âhoverµÄ¹æÔò£º
ÔÚCSS1ÖдËαÀà½ö¿ÉÓÃÓÚa¶ÔÏó¡£ÇÒ¶ÔÓÚÎÞhrefÊôÐÔ£¨ÌØÐÔ£©µÄa¶ÔÏ󣬴ËαÀ಻·¢Éú×÷Óá£
ÔÚCSS2ÖдËαÀà¿ÉÒÔÓ¦ÓÃÓÚÈκζÔÏó¡£
µ«Ä¿Ç°IE5.5¡¢IE6½öÖ§³ÖCSS1ÖеÄ:hover£¬²»¹ýгöµÄIE7ÊÇÖ§³ÖCSS2ÖеÄ:hover¡£
µ±ÎÒÃÇÓÃαÀà:hover×öijЩÌØÊâЧ¹ûʱ£¬ÒÀ¾ÝCSS2ºÜºÃÍê³É£¬µ«ÎªÁËÏÖÔÚÕ¼¾ÝÖ÷Á÷ä¯ÀÀÆ÷µÄIE6£¬ÎÒÃÇÓÖ²»µÃ²»×öºÜ¶à¹¤×÷£¬±ÈÈç¸øÌí¼ÓaÔªËصÈÀ´Ä£ÄâÍê³É×îÖÕµÄЧ¹û¡£
»òÐíÕâÑù½²Ì«¿Õ¶´£¬Çë¿´ÏÂÃæÒ»¸ö³£¼ûµÄ´¥·¢ÏÔʾµÄÀý×Ó£¨½öÑ¡ÔñIE6ΪÀý½²½â£©¡£
ÎÒÃÇÏÈÓÃCSS2µÄд·¨À´ÊµÏÖ£º
XHTML²¿·Ö£º
³ÌÐò´úÂë
<ul>
<li>Êó±êÒƹýÀ´´¥·¢ÎÒ°É£¡<a href="#" title="">¹þ¹þ£¬ÖÕÓÚ±»Äã·¢ÏÖÁË£¡</a></li>
</ul>
µ«Ä¿Ç°IE5.5¡¢IE6½öÖ§³ÖCSS1ÖеÄ:hover£¬²»¹ýгöµÄIE7ÊÇÖ§³ÖCSS2ÖеÄ:hover¡£
µ±ÎÒÃÇÓÃαÀà:hover×öijЩÌØÊâЧ¹ûʱ£¬ÒÀ¾ÝCSS2ºÜºÃÍê³É£¬µ«ÎªÁËÏÖÔÚÕ¼¾ÝÖ÷Á÷ä¯ÀÀÆ÷µÄIE6£¬ÎÒÃÇÓÖ²»µÃ²»×öºÜ¶à¹¤×÷£¬±ÈÈç¸øÌí¼ÓaÔªËصÈÀ´Ä£ÄâÍê³É×îÖ ......

cssÑùʽÒýÓÃʵÀý

//cssÑùʽµÄÊéд
//ÔªËØID
#tb1{width:100%;height:80px;background-color:#FFD700;padding:4px;font-family:verdana,tahoma;font-weight:bold;}
#tb2{width:100%;padding:4px;font-family:verdana,tahoma;margin:12px
0px 0px 0px;background-color:#EEEEEE;font-weight:bold;}
//Àà
.test{cursor:hand;
   
border-right: white thin inset;
    border-top: black thin inset;
   
border-left: black thin inset;
    border-bottom: white thin
inset;  
    }
.post1
{
 cursor:move; background:red;
color:Navy; border-right: black thin inset;
}
//ÔªËØ
body
{
 background-color:Gray:
}
//cssÑùʽµÄÔËÓÃ
<html>
<head
runat="server">
    <title>ÎÞ±êÌâÒ³</title>
    //ÒýÈëcssÑùʽÎļþ
    <link type ="text/css"
rel = "stylesheet"  href = StyleSheet.css />
</head>
//ÑùʽԪËص ......

cssÖÐ displayÊôÐÔºÍvisibilityµÄÇø±ð

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-block
The element will generate a block box, laid out as an inline box
inline-table
The element will generate an inline box (like <table>, with no line break before or after)
list-item
The element will generate a block box, and an inline box for the list marker
run-in
The element will generate a block or inline box, depending on context
table
The element will behave like a table (like <table>, with a line break before and after)
table-caption
The element will behave like a table caption (like <caption>)
table-cell
The element will behave like a table cell
table-column
The element will behave like a table column
table-column-group
The element will behave like a ......

CSS ÎÄ×ÖÓëÊäÈë¿ò¶ÔÆë

ÔÚ½øÐÐdiv+cssÍøÒ³²¼¾ÖµÄʱºò£¬²»¿É±ÜÃâµÄÐèÒª²åÈëÒ»¶¨µÄ±íµ¥ÔªËØ£¬inputÊÇÆäÖÐ×î³£¼ûµÄÒ»ÖÖ¡£ÎÒÃÇÔÚ²¼¾ÖÖУ¬³£»áÓöµ½Îı¾ÊäÈë¿òÓëͬ´¦Ò»ÐеÄÎı¾²»¶ÔÆëµÄÎÊÌâ¡£Õâ¸öÎÊÌâÉèÖÃinputµÄvertical-align:middleÊôÐÔÀ´½â¾ö¡£
ÎÒÃÇÀ´¿´ÏÂÃæµÄÀý×Ó£¬ÈçºÎ½â¾öÎı¾ÊäÈë¿òÓëÎı¾¶ÔÆëµÄÎÊÌ⣡
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>52css.com</title>
<style type="text/css">
<!--
#a {
 height:30px;
 border:1px solid #ccc;
 }
#b {
 margin-top:20px;
 height:30px;
 border:1px solid #ccc;
 }
#a input {
 width:200px;
 height:30px;
 border:1px solid red;
 }
#b input {
 width:200px;
 height:30px;
 border:1px solid red;
 vertical-align:middle;
 }
-->
</style>
</head> ......
×ܼǼÊý:772; ×ÜÒ³Êý:129; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [31] [32] [33] [34] 35 [36] [37] [38] [39] [40]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ