¡¶¾«Í¨CSS¸ß¼¶WEB±ê×¼½â¾ö·½°¸¡·µÚËÄÕ£º¶ÔÓ¦Á´½ÓÑùʽ
ÎÒÔÚwww.c09.com ·¢±íÁËÕâ¸ö±Ê¼Ç²¢ÉÏ´«ÁËÔÖøµÄPDF£¬½ñÌìÓпգ¬×ªµ½BLOGÉÏÀ´¡£
µÚËÄÕ¡¢¶ÔÓ¦Á´½ÓÑùʽ
4.1 ¼òµ¥µÄÁ´½ÓÑùʽ[code]
/*ËùÓÐÁ´½ÓºìÉ«*/
a{color:red;}
/*δ·ÃÎÊÁ´½ÓÀ¶É«£¬ÒÑ·ÃÎʺìÉ«*/
a:link{color:blue;}
a:visited{color:green}
/*Êó±êÐüͣʱÁ´½ÓºìÉ«*/
a:hover,active{color:red;}
/*ƽʱ²»ÏÔʾÏ»®Ïߣ¬Êó±êÐüͣʱÏÔʾÏ»®Ïß*/
a:link,avisited{text-decoration:none;}
a:hover,a:active{text-decoration:underline}
[/code]4.2 ÈÃÏ»®Ï߸üÓÐȤ[code]
/*ÓüӴÖЧ¹û´úÌæÏ»®Ïß*/
a:link,avisited{
text-decoration:none;
font-weight:bold;
}
/*Êó±êÐüͣʱÏÔʾÏ»®Ïß*/
a:hover,avisited{
text-decoration:none;
border-bottom:1px dotted #000;
}
/*¸Ä±äÏ»®ÏßʽÑù*/
a:hover,a:active{
border-bottom-style:solid;
}
/*ÓÃͼƬ»æÖÆÏ»®Ïß*/
a:link,a:visited{
color:#666;
text-decoration:none;
background:url(images/underline1.gif) repeat-x left bottom;
}
/*Êó±êÐüͣʱÏÔʾ¶¯»±³¾°*/
a:hover,a:active{
background-image:url(images/underline1-hover.gif);
}
[/code]4.3 Í»³ö²»Í¬ÀàÐ͵ÄÁ´½Ó[code]
/*ΪËùÓÐÍⲿÁ´½ÓÌí¼ÓÒ»¸öÀ࣬Ϊ¸ÃÀàÌí¼ÓÒ»¸öÍⲿÓʼþͼ±ê*/
.external{
backgrount:url(images/externallink.gif) no-repeat right top;
padding-right:10px;
}
/*²»ÓÃÊÖ¹¤Ìí¼ÓÀ࣬×Ô¶¯ÅбðÍⲿÁ´½Ó(½öа汾ä¯ÀÀÆ÷¿ÉÓÃ)*/
a[href^="http:"]{
background:url(images/externallink.gif) no-repeat right top;
padding-right:10px;
}
/*±¾Õ¾Á´½Ó³ýÍâ*/
a[href^="http://www.cn09.com"],a[href^="http://cn09.com"]{
background-image:none;
padding-right:0;
}
/*ÀàËÆµÄ£¬¿ÉÓÃÌí¼ÓÓʼþÁ´½Óͼ±ê*/
a[href^="mailto:"]{
background:url(images/email.png) no-repeat right top;
padding-right:10px;
}
/*·Ç±ê×¼ÐÒéÈçaim*/
a[href^="aim:"]{
background:url(images/im.png) no-repeat right top;
padding-right:10px;
}
/*pdfºÍwordÎĵµ*/
a[href$=".pdf"]{
backg
Ïà¹ØÎĵµ£º
<!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>ÎÞ±êÌâÎĵµ</ ......
Ò»¡¢CSS Ö㤶ÈÓëÑÕÉ«
1¡¢³¤¶Èµ¥Î»ËµÃ÷
in Ó¢´ç
cm ¹«·Ö
mm ¹«Àï
cm ÒÔĿǰ×ÖÌå¸ß¶ÈΪµ¥Î»
ex ÒÔСд×Öĸ¸ß¶ÈΪµ¥Î»£¨´ó²¿·Ö²»Ö§³Ö£©
pt 1pt/72Ó¢´ç
pc 1pc/12pt
px ÏñËØ£¨ÍƼöʹÓã©
2¡¢ÑÕÉ«µ¥Î»£º ˵Ã÷
Ê®Áù½øÖÆÈ磺color:#ff0000
ÑÕÉ«Ãû³ÆÈ磺color:red
ÈýÔÉ«µ¥Î»È磺rgb(255,0,0)
Ò»°ã×î³£ÓõÄÊÇÊ®Áù½øÖ ......
1.Çø±ðIEºÍ·ÇIEä¯ÀÀÆ÷
#tip {
background:blue; /*·ÇIE ±³¾°藍É«*/
background:red \9; /*IE6¡¢IE7¡¢IE8±³¾°紅É«*/
}
2.Çø±ðIE6,IE7,IE8,FF
¡¾Çø±ð·ûºÅ¡¿£º¡¸\9¡¹¡¢¡¸*¡¹¡¢¡¸_¡¹
¡¾Ê¾Àý¡¿£º
#tip {
background:blue; /*Firefox ±³¾°±äÀ¶É«*/
background:r ......
ÔÚhtmlÖУ¬¼´Ê¹ÎÒÃÇûÓÐÖ¸¶¨Ò³ÃæÔªËØÏÔʾµÄcssÑùʽ£¬ÔªËØÒ²»á°´ÕÕĬÈϵĵıê×¼cssÑùʽȥÏÔʾ¡£Òò´ËÕÆÎÕ»ù±¾µÄhtml±êÇ©¿ÉÒÔÔÚÒ»¶¨³Ì¶ÈÉϾ«¼òÄãµÄcss´úÂ룬ÏÖ½«html±êÇ©µÄĬÈÏÊôÐÔ½øÐÐÒ»¶¨µÄ»ã×ÜÈçÏ£º
li { display: list-item }
h ......
¡¾¼ò ½é¡¿
Ϊ·½±ãÕ¾µã°§µ¿,ÌØÌṩcssÂ˾µ´úÂë,ÒÔ±í°§µ¿.ÒÔÏÂΪȫվCSS´úÂë
Ϊ·½±ãÕ¾µã°§µ¿,ÌØÌṩcssÂ˾µ´úÂë,ÒÔ±í°§µ¿.ÒÔÏÂΪȫվCSS´úÂë.
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
ʹÓ÷½·¨:Õâ¶Î´úÂë¿ÉÒÔ±äÍøÒ³ÎªºÚ°×,½«´úÂë¼Óµ½CSS×î¶¥¶Ë¾Í¿ÉÒÔʵÏÖËØ×°.½¨ÒéÈ«¹úÕ¾³¤¶¯ÆðÀ´.ÎªÔ ......