资源描述:
《第章 利用css div进行网页布局和排版》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、第13章利用CSS+Div进行网页布局和排版Thischapterwilltellyouhowtolayoutandtypesetyourwebpages.Thelayout,theEnglishnameLayouts,referstothenumberofdifferentfunctionalpartitionsonthepageandthelocationandorderbetweenthem.Inthepagelayoutthisworkverymuchlikethenewspapereditor,thedailynews
2、indifferentsizesinfixedlayoutswereplacedtoachievethebestresults.Atpresent,usingCSSandDivcombinationtolayoutthepagehasbecomeanacceptedstandardmethod,andbeforethis,thepopularoreventheonlywayistousetheformtocarryonthepagelayout.Thischapterbeginswiththeirrespectiveadvant
3、agesanddisadvantagesoftwo.13.1formorDiv?"Survivalordeath?"That'saproblem."Forweblayouts,usingtablesorDivisalsoaproblem.Today,whenDiv+CSSoccupiesthedominantpositioninweblayout,itisnecessarytoreviewtheformfirstwhenlearningit.13.1.1usestablestolayoutwebpagesByusingtheme
4、thodofwebpagelayouttableisverysimple:thewebsiteisdividedintoseveralforms,thetopofthepage,usuallynavigationposition,atable;themiddleofthepage,tableofcontents,newsphotosandsoon,dividedinto2to3bar,atable;pagebottom,textnavigation,copyrightandsoonatable.Ifyouneedsomethin
5、ginthemiddleofthepage,youcanalsofurthernesttablesinit.13.1.2usesDiv+CSSforweblayoutSincetheuseoftablesforweblayouthassomeshortcomingsmentionedearlier,inrecentyears,peoplebegantograduallyuseDiv+CSSmethodtoachievethetaskoflayout.ThebiggestadvantageoftheDiv+CSSapproachi
6、sthatcontentandlayoutarehandledseparately,eliminatingthecumbersomelabelsofthetables,andreducingthesizeofthepagefiles.Accordingtothepopularstructureofwebpages,Div+CSScancompletethefollowinglayouts:Creatingacolumnlayout.Creatingatwocolumnweblayout.Creatingmultiplecolum
7、nlayout.Creatinganirregularweblayout.Fromthefollowingsection,we'lllearnthespecificprocessofcreatingweblayoutsusingDivandCSS.13.2createacolumnlayoutwithDiv+CSSTheconceptofpagelayoutandthetwolayoutmethodsarementionedintheprevioussection,especiallytheadvantagesanddisadv
8、antagesoftraditionallayout.ThissectiondescribesthespecificprocessofcreatingaweblayoutusingDiv+CSS.Wehavevisitedmanywebsites,fromthe