|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
在主页制作时采用CSS技术,可以有效地对页面的布局、字体、颜色、背景和其它效果实现更加精确的控制。
CSS代码
- 以下是援用片断:/*commonstyling*//*setuptheoverallwidthofthemenudiv,thefontandthemargins*/.menu{font-family:arial,sans-serif;width:750px;margin:0;margin:50px0;}/*removethebulletsandsetthemarginandpaddingtozerofortheunorderedlist*/.menuul{padding:0;margin:0;list-style-type:none;}/*浮动列表,因而可让items在一行上,而且他们的绝对定位可让上面的列表显现在准确的地位上*/.menuulli{float:left;position:relative;}/*stylethelinkstobe104pxwideby30pxhighwithatopandrightborder1pxsolidwhite.Setthebackgroundcolorandthefontsize.*/.menuullia,.menuullia:visited{display:block;text-align:center;text-decoration:none;width:104px;height:30px;color:#000;border:1pxsolid#fff;border-width:1px1px00;background:#c9c9a7;line-height:30px;font-size:11px;}/*makethedropdownulinvisible*/.menuulliul{display:none;}/*specifictononIEbrowsers*//*setthebackgroundandforegroundcolorofthemainmenulionhover*/.menuulli:hovera{color:#fff;background:#b3ab79;}/*makethesubmenuulvisibleandpositionitbeneaththemainmenulistitem*/.menuulli:hoverul{display:block;position:absolute;top:31px;left:0;width:105px;}/*stylethebackgroundandforegroundcolorofthesubmenulinks*/.menuulli:hoverullia{display:block;background:#faeec7;color:#000;}/*stylethebackgroundandforgroundcolorsofthelinksonhover*/.menuulli:hoverullia:hover{background:#dfc184;color:#000;}
复制代码 XHTML代码
- 以下是援用片断:<divclass="menu"><ul><li><aclass="hide"href="../menu/index.html">DEMOS</a><!--[iflteIE6]><ahref="../menu/index.html">DEMOS<table><tr><td><![endif]--><ul><li><ahref="../menu/zero_dollars.html"title="Thezerodollaradspage">zerodollars</a></li><li><ahref="../menu/embed.html"title="Wrappingtextaroundimages">wrappingtext</a></li><li><ahref="../menu/form.html"title="Stylingforms">styledform</a></li><li><ahref="../menu/nodots.html"title="Removingactive/focusborders">activefocus</a></li><li><ahref="../menu/shadow_boxing.html"title="Multi-positiondropshadow">shadowboxing</a></li><li><ahref="../menu/old_master.html"title="ImageMapfordetailedinformation">imagemap</a></li><li><ahref="../menu/bodies.html"title="funwithbackgroundimages">funbackgrounds</a></li><li><ahref="../menu/fade_scroll.html"title="fade-outscrolling">fadescrolling</a></li><li><ahref="../menu/em_images.html"title="emsizeimagescompared">emsizedimages</a></li></ul><!--[iflteIE6]></td></tr></table></a><![endif]--></li><li><aclass="hide"href="index.html">MENUS</a><!--[iflteIE6]><ahref="index.html">MENUS<table><tr><td><![endif]--><ul><li><ahref="spies.html"title="acodedlistofspies">spiesmenu</a></li><li><ahref="vertical.html"title="ahorizontalverticalmenu">verticalmenu</a></li><li><ahref="expand.html"title="anenlargingunorderedlist">enlarginglist</a></li><li><ahref="enlarge.html"title="anunorderedlistwithlinkimages">linkimages</a></li><li><ahref="cross.html"title="non-rectangularlinks">non-rectangular</a></li><li><ahref="jigsaw.html"title="jigsawlinks">jigsawlinks</a></li><li><ahref="circles.html"title="circularlinks">circularlinks</a></li></ul><!--[iflteIE6]></td></tr></table></a><![endif]--></li><li><aclass="hide"href="../layouts/index.html">LAYOUTS</a><!--[iflteIE6]><ahref="../layouts/index.html">LAYOUTS<table><tr><td><![endif]--><ul><li><ahref="../layouts/bodyfix.html"title="Crossbrowserfixedlayout">Fixed1</a></li><li><ahref="../layouts/body2.html"title="Crossbrowserfixedlayout">Fixed2</a></li><li><ahref="../layouts/body4.html"title="Crossbrowserfixedlayout">Fixed3</a></li><li><ahref="../layouts/body5.html"title="Crossbrowserfixedlayout">Fixed4</a></li><li><ahref="../layouts/minimum.html"title="Asimpleminimumwidthlayout">minimumwidth</a></li></ul><!--[iflteIE6]></td></tr></table></a><![endif]--></li><li><aclass="hide"href="../boxes/index.html">BOXES</a><!--[iflteIE6]><ahref="../boxes/index.html">BOXES<table><tr><td><![endif]--><ul><li><ahref="spies.html"title="acodedlistofspies">spiesmenu</a></li><li><ahref="vertical.html"title="ahorizontalverticalmenu">verticalmenu</a></li><li><ahref="expand.html"title="anenlargingunorderedlist">enlarginglist</a></li><li><ahref="enlarge.html"title="anunorderedlistwithlinkimages">linkimages</a></li><li><ahref="cross.html"title="non-rectangularlinks">non-rectangular</a></li><li><ahref="jigsaw.html"title="jigsawlinks">jigsawlinks</a></li><li><ahref="circles.html"title="circularlinks">circularlinks</a></li></ul><!--[iflteIE6]></td></tr></table></a><![endif]--></li><li><aclass="hide"href="../mozilla/index.html">MOZILLA</a><!--[iflteIE6]><ahref="../mozilla/index.html">MOZILLA<table><tr><td><![endif]--><ul><li><ahref="../mozilla/dropdown.html"title="Adropdownmenu">dropdownmenu</a></li><li><ahref="../mozilla/cascade.html"title="Acascadingmenu">cascadingmenu</a></li><li><ahref="../mozilla/content.html"title="Usingcontent:">content:</a></li><li><ahref="../mozilla/moxbox.html"title=":hoverappliedtoadiv">mozziebox</a></li><li><ahref="../mozilla/rainbow.html"title="Icanbuildarainbow">rainbowbox</a></li><li><ahref="../mozilla/snooker.html"title="Snookercue">snookercue</a></li><li><ahref="../mozilla/target.html"title="TargetPractise">targetpractise</a></li><li><ahref="../mozilla/splittext.html"title="Twotoneheadings">twotoneheadings</a></li><li><ahref="../mozilla/shadow_text.html"title="Shadowtext">shadowtext</a></li></ul><!--[iflteIE6]></td></tr></table></a><![endif]--></li><li><aclass="hide"href="../ie/index.html">EXPLORER</a><!--[iflteIE6]><ahref="../ie/index.html">EXPLORER<table><tr><td><![endif]--><ul><li><ahref="../ie/exampleone.html"title="Exampleone">exampleone</a></li><li><ahref="../ie/weft.html"title="Weftfonts">weftfonts</a></li><li><ahref="../ie/exampletwo.html"title="Verticalalign">verticalalign</a></li></ul><!--[iflteIE6]></td></tr></table></a><![endif]--></li></ul><divclass="clear"></div></div>
复制代码 上一页12</p>
那么什么是Div+CSS标准?Div+CSS的标准化设计到底有什么好处? |
|