1£¬ul£ºÄ¬ÈϵÄulµÄmarginºÍpadding²»ÊÇ0£¬Èç¹ûÔÚµ¼º½ÖÐÓõ½ÁË×󸡶¯µÄli£¬ÍùÍù»á°ÑÍⲿµÄdiv³Å´ó£¬µ¼ÖÂÒ³Ãæ±äÐΣ¬Õâ¾ÍÐèÒªÎÒÃÇÔÚд´úÂëµÄʱºò²»ÒªÍü¼Ç£º
ul{margin:0px; padding:0px;}
2£¬img£º¹ØÓÚͼƬ£¬ÓÐʱie6ÀïÏÔʾµÄͼƬheight×ÜÊÇÒª´óÓÚ׼ȷֵ£¬ÕâÀï¾ÍÐèÒªÎÒÃǼÇסÏÂÃæÕâÒ»µã£º
img{ display£ºblock}¡£»¹ÓÐÒ³ÃæÖÐ×îºÃ²»ÒªÓôó¿é±³¾°£¬ÄÜƽÆ̵ÄҪƽÆÌ£¬·ñÔò¼ÓÔØÆðÀ´»áºÜÂý£¬Ò²²»ÀûÓÚÒÔºóµÄÓÅ»¯ºÍÀ©Õ¹£¬µ±È»Ò²ÓÐЩ´óµÄÍøÕ¾£¬ÏÖÔÚ¶¼¾¡Á¿°Ñ±³¾°Í³Ò»·Åµ½Ò»ÕÅͼƬÉÏ£¬ÓÃbackground-postionÀ´È¡µÃ±³¾°£¬ÕâÑùÆäʵҲºÃ£¬±³¾°ËäÈ»´óÁ˵㣬µ«Ö»Ðèͳһ¼ÓÔØÒ»´Î£¬¾ÍokÁË£¬ËÙ¶ÈÒ²²»»áÌ«Âý¡£Í¼Æ¬×îºÃµÄ¸ñʽ¾ÍÊÇgif¸ñʽ£¬¼´È·±£Á˱³¾°Í¸Ã÷£¬ÔÚie6ÖÐÓÖ²»»áÓÐÒõÓ°£¬ÓÐʱgifͼƬ»áÓоâ³Ý£¬Õâ¾ÍÐèÒªÎÒÃDZ£´æ³Éweb¸ñʽ£¬ÉèÖÃÒ»ÏÂmatter£¬matterµÄÖµÓë±³¾°ÑÕÉ«µÄÖµÔ½Ïà½üÔ½ºÃ¡££¨µ±È»ÓÐʱÆȲ»µÃÒÑpngµÄͼƬҲ¿ÉÒÔ£©
3£¬overflow£ºÓÐʱÎÒÃǻῴµ½£¬Ò»Ð©¹«Ë¾µÄ×¢²áÐÒ鶼ÊǺó¤ºÃ³¤µÄ£¬µ«ÓÖ²»ÄÜ°ÑÒ³ÃæÀµÄÌ«³¤£¬Õâ¾ÍÓõ½ÁËoverflow£¬ÎÒÃÇ¿ÉÒÔ°ÑdivµÄstyleÀï¼ÓÉÏÕâ¸ö£ºoverflow£ºauto;
4£¬Ð¡´°¿Úµ¯³ö£ºµ±ÎÒÃǵã»÷ij¸ö°´Å¥£¬¿ÉÄܻῴµ½Ò»¸öС´°¿Úµ¯³ö£¬¶ø´°¿ÚÆäËüµÄ²¿·Ö¶¼±äÁË»ÒÉ«£¬ÕâÊÇÔõôʵÏÖµÄÄØ£¬ÆäʵºÜ¼òµ¥div+css¾Í¿ÉÒÔʵÏÖ£º
css²¿·Ö£º
.black_overlay { display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index: 1001; -moz-opacity: 0.8; opacity: .80; filter: alpha(opacity=50); } .white_content { display: none; position: absolute; top:20%; left: 30%; width:outo; background-color: white; z-index: 1002; overflow: auto; } .white_content2 { display: none; position: absolute; top: 20%; left: 18%; width:896px; background-color: white; z-index: 1002; overflow: auto; text-align: center; } .qpshcom { background-color: #efefef; color: #666666; border-width: 1px; border-color: #cccccc; border-style: solid; margin: 6px; padding: 6px; font-size: 14px; line-height: 200%; float: midden; }
div²¿·Ö£º
´ò¿ª°´Å¥²¿·Ö£º
(¡®light¡¯).style.display=¡¯block¡¯;document.getElementById(¡®fade¡¯).style.display=¡¯block¡¯¡±
¹Ø±Õ°´Å¥²¿·Ö£ºonclick=¡±document.getElementById
(¡®light¡¯).style.display=¡¯none¡¯;document.getElementById(¡®fade¡¯).style.display=¡¯none¡¯¡±
4£¬float£ºÓÐʱºòһЩdiv»á¼·µ½Ò³ÃæµÄÉÏ·½£¬°ÑÒ³Ãæ¼·ÆÆ£¬ÕâÀï¿ÉÄܾÍÊǸ¡¶¯ÒýÆðµÄ£¬ÕâʱºòÎÒÃǾÍÓõ½Õâ¸ö£ºclear£ºboth£¬ºÜ²»´íµÄ½â¾ö·½·¨£¬²»·ÁÒ»ÊÔ¡£
5£¬heightµÈÓÚ1pxµÄdiv£¬ÔÚie6ÖпÉÄܲ¢²»ÊÇ1px£¬ÄÇÔõô½â¾öÄØ£¿²»·ÁÊÔһϣºÔÚÕâ¸ödivµÄstyleÀï¼ÓÉÏfont-size£º1px;ÕâÑù¾ÍokÁË¡£
6£¬idºÍclass£ºµ±Ò»¸ödivÒªÔÚÒ³ÃæÖжà´ÎʹÓÃʱ£¬²»ÒªÓÃid£¬ÒªÓÃclass£¬»¹ÓоÍÊÇÒªÓÃÒýÓÃjsµÄʱºò£¬Ñùʽ×îºÃ²»ÒªÓÃid£¬ÒòΪidÒªÁô¸øjsʹÓ㬵±³ÌÐòԱдºǫ́ÓõÄÊÇ.netʱ£¬×îºÃ²»ÓÃid£¬idÒªÁô¸ø³ÌÐòÔ±Óã¬Ç°Ì¨ÎÒÃǾÍÓÃclassºÃÁË¡£
7£¬Á´½Ó£º
.link£ºlink{}
.link£ºvisited{}
.link£ºhover{}
.link£ºactive{}
ÓÐÒ»µã£¬visitedÓëhoverµÄ˳ÐòÒ»¶¨²»Äܵ¹»»£¬·ñÔòie6Öлá³öÏÖ´ó´óµÄÎÊÌâ¡£
8.³¬Á´½Ó·ÃÎʹýºóhoverÑùʽ²»³öÏÖ?
±»µã»÷·ÃÎʹýµÄ³¬Á´½ÓÑùʽ²»ÔÙ¾ßÓÐhoverºÍactiveµÄÑùʽÁË, ½â¾ö·½·¨ÊǸıäCSSÊôÐÔµÄÅÅÁÐ˳Ðò: L-V-H-A
ps£ººÃÔÚ×Ô¼ºÒ»¿ªÊ¼Êéдʱ¾ÍûÓаÑÕâËÄÖÖÑùʽдȫ¹ý£¬ÎÒֻд a:link £¬a:hover £¬Ò»Ö±Ò²Ã»³öÏÖʲôÎÊÌ⣬ºóÀ´·¢ÏÖie6ÏÂa:visited ºÍ ffϵÄÑÕÉ«²»Ò»Ö£¬Õâ²Å·¢ÏÖÕâÒ»¸öÎÊÌâ¡£¿´À´Ã»ÓÐÎÊÌâÒ²²»´ú±íÊéдÕýÈ·¡£
9.IE6µÄË«±¶±ß¾àBUG
ÀýÈç:
<style type=¡±text/css¡±> body {margin:0} div { float:left; margin-left:10px; width:200px; height:200px; border:1px solid red; } </style>
¸¡¶¯ºó±¾À´Íâ±ß¾à10px,µ«IE½âÊÍΪ20px,½â¾ö°ì·¨ÊǼÓÉÏdisplay:inline;
10.ΪʲôFFÏÂÎı¾ÎÞ·¨³Å¿ªÈÝÆ÷µÄ¸ß¶È?
±ê×¼ä¯ÀÀÆ÷Öй̶¨¸ß¶ÈÖµµÄÈÝÆ÷ÊDz»»áÏóIE6ÀïÄÇÑù±»³Å¿ªµÄ,ÄÇÎÒÓÖÏë¹Ì¶¨¸ß¶È£¬ÓÖÏëÄܱ»³Å¿ªÐèÒªÔõÑùÉèÖÃÄØ£¿°ì·¨¾ÍÊÇÈ¥µôheightÉèÖÃmin-height:200px; ÕâÀïΪÁËÕչ˲»ÈÏʶmin-heightµÄIE6¿ÉÒÔÕâÑù¶¨Ò壺
div { height:auto!important; height:200px; min-height:200px; }
11.Ϊʲôweb±ê×¼ÖÐIEÎÞ·¨ÉèÖùö¶¯ÌõÑÕÉ«ÁË?
ÔÀ´ÑùʽÉèÖãº
<style type=¡±text/css¡±> body { scrollbar-face-color:#f6f6f6; scrollbar-highlight-color:#fff; scrollbar-shadow-color:#eeeeee; scrollbar-3dlight-color:#eeeeee; scrollbar-arrow-color:#000; scrollbar-track-color:#fff; scrollbar-darkshadow-color:#fff; } </style>
½â¾ö°ì·¨Êǽ«body»»³Éhtml
12.ΪʲôÎÞ·¨¶¨Òå1px×óÓҸ߶ȵÄÈÝÆ÷?
IE6ÏÂÕâ¸öÎÊÌâÊÇÒòΪĬÈϵÄÐиßÔì³ÉµÄ£¬½â¾öµÄ·½·¨Ò²Óкܶ࣬ÀýÈ磺overflow:hidden | zoom:0.08 | line-height:1px;
13.ÔõôÑù²ÅÄÜÈòãÏÔʾÔÚFLASHÖ®ÉÏÄØ?
¸øFLASHÉèÖÃ͸Ã÷:
<param name=¡±wmode¡± value=¡±transparent¡± />14.ÔõÑùʹһ¸ö²ã´¹Ö±¾ÓÖÐ?
<style type=¡±text/css¡±> <!¨C div { position:absolute; top:50%; left:50%; margin:-100px 0 0 -100px; width:200px; height:200px; border:1px solid red; } ¨C> </style>
ÕâÀïʹÓðٷֱȾø¶Ô¶¨Î»£¬ÓëÍâ²¹¶¡¸ºÖµµÄ·½·¨£¬¸ºÖµµÄ´óСΪÆä×ÔÉí¿í¶È¸ß¶È³ýÒÔ¶þ
ps:marginµÄÖµ¾ÍÊÇdiv¿í¶ÈµÄ1/2;
15£¬ firefoxÖÐǶÌ×div±êÇ©£¬ÈçºÎʵÏÖ¾ÓÖУ¬¼Ù¶¨ÓÐÈçÏÂÇé¿ö£º
<div id=¡±a¡±> <div id=¡±b¡±> </div> </div>
Èç¹ûҪʵÏÖbÔÚaÖоÓÖзÅÖã¬Ò»°ãÖ»ÐèÓÃCSSÉèÖÃaµÄtext-alignÊôÐÔΪcenter¡£ÕâÑùµÄ·½·¨ÔÚIEÀï¿´ÆðÀ´Ò»ÇÐÕý³££»µ«ÊÇÔÚ FirefoxÖÐbÈ´»áÊǾÓ×óµÄ¡£
½â¾ö°ì·¨¾ÍÊÇÉèÖÃbµÄºáÏòmarginΪauto¡£ÀýÈçÉèÖÃbµÄCSSÑùʽΪ£ºmargin: 0 auto;¡£
Ï£Íû¶Ô´ó¼ÒÓÐÓã¡
ÍƼöÐÅÏ¢
- CSS²¼¾ÖµÄ8¸öÄãÐèÒªÕÆÎյļ¼ÇÉ
- IE6¡¢IE7 ¡¢IE8¡¢FFµÄCSSHack
- ̽¾¿cssÖи÷ÖÖÇé¿öϵÄÔªËصĴ¹Ö±ºÍˮƽ¾ÓÖеÄÎÊÌâ
- YahooÍŶӾÑ飺ÍøÕ¾ÐÔÄÜÓÅ»¯µÄ34Ìõ»Æ½ð·¨Ôò(ת)
- HTMLÖÐÀûÓÃ404½«ÀÏÓòÃûÖض¨Ïòµ½ÐÂÓòÃû
- ÈÃdiv¸¡ÓÚselectÖ®ÉÏ
- ¼¸Æª¹ØÓÚºÐ×ÓÄ£Ð͵ÄÎÄÕ£¬ÈÕºó·½±ã¼ìË÷£º
- Css ÑùʽʹÓþÑé×ܽá
- display:inline-blockµÄÉîÈëÀí½â
- ÈçºÎÔÚÍøÒ³ÖÐǶÈëÌØÊâ×ÖÌå
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- ´ó±¥ÑÛ¸£ 7¿îÀàÐ͸÷ÒìµÄCSS3ʵÓò˵¥
- div+css¶àä¯ÀÀÆ÷²âÊÔ·½·¨
- cssËõд¸øÍøÕ¾¼ÓËÙ£¬ÆäʵºÜ¶àʱºò¶¼»áÓõ½
- ´¿CSS´òÔìBubbleÆøÅÝÌáʾ¿ò
- CSSʵÏÖͼƬ°´±ÈÀýËõ·Å
- CSS¼¼ÇÉÈÃÄãµÄÍøÕ¾¸üÉÏÒ»²ãÂ¥
- ¹Ì¶¨¸ß¶Èdiv,ËæÄÚÈÝ×Ô¶¯±ä¸ßcss¶¨Òå·½·¨
- web¼æÈݸ÷¸öä¯ÀÀÆ÷×îС¸ß¶ÈµÄд·¨
- CSS£¬Ç³ÎöpositionÖÐRelativeºÍAbsolute
- 12ÌõÔÔò£º±£³ÖHTML´úÂëÕû½à&¹æ·¶
¡Á
¶©ÔÄ
¶©Ôĵ½ÔĶÁÆ÷£º
ÆÀÂÛ