div css常用网页制作布局技术技巧(div css layout techniques commonly used in web pages)

div css常用网页制作布局技术技巧(div css layout techniques commonly used in web pages)

ID:14525009

大小:14.78 KB

页数:10页

时间:2018-07-29

div css常用网页制作布局技术技巧(div css layout techniques commonly used in web pages)_第1页
div css常用网页制作布局技术技巧(div css layout techniques commonly used in web pages)_第2页
div css常用网页制作布局技术技巧(div css layout techniques commonly used in web pages)_第3页
div css常用网页制作布局技术技巧(div css layout techniques commonly used in web pages)_第4页
div css常用网页制作布局技术技巧(div css layout techniques commonly used in web pages)_第5页
资源描述:

《div css常用网页制作布局技术技巧(div css layout techniques commonly used in web pages)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、div+css常用网页制作布局技术技巧(Div+csslayouttechniquescommonlyusedinwebpages)CSSlayoutcommonlyusedmethod:float:none

2、left

3、rightValue:None:defaults.ObjectsarenotfloatingTheleft:textflowstotherightoftheobjectTheright:textflowstotheleftoftheobjectHowdoesitwork?Lookatanexampleof

4、arowoftwocolumnsXHTMLcode:Herearethequotes:hereisthefirstcolumn

hereisthesecondcolumn,
Web/*thisiscontrarytotheintentofthestandard,justwanttosayinitsfollowingelementsneedtoclear.<

5、/div>CSScode:Herearethequotes:#wrap{width:100;height:auto;}#column1{float:left;width:40;}#column2{float:right;width:60;}.clear{clear:both;}Position:static

6、absolute

7、fixed

8、relativeValue:Static:defaults.Nospecialpositioning,objectsfollowHTMLpositioningrulesAbsolute:

9、drawsobjectsfromthedocumentstreamandusesleft,right,top,bottom,andotherattributestomakeabsolutepositioningrelativetotheirnearest,mostlocalizedparentobject.Ifthereisnosuchparentobject,thenthebodyobject.ThestackisdefinedbytheZ-indexpropertyFixed:notsupported.Objecto

10、rientationfollowsabsolute(absolute)mode.ButfollowsomerulesRelative:objectsarenotstackable,buttheyareoffsetinthenormaldocumentstreambasedonattributessuchasleft,right,top,bottom,andsoonItimplementsanexampleofarowoftwocolumnsXHTMLcode:Herearethequotes:

11、hereisthefirstcolumn

hereisthesecondcolumn,CSScode:Herearethequotes:Therelativepositioningof*/width:770px#wrap{position:relative;}/*;#column1{position:absolute;top:0;left:0;width:300px;}#column2{position:absolu

12、te;top:0;right:0;width:470px;}What'sthedifferencebetweenthem?Obviously,floatisrelativelypositionedandchangeswiththesizeandresolutionofthebrowser,andthepositiondoesn'twork,soingeneral,it'sthefloatlayout!CSScommonlayoutinstanceSinglelineHerearethequotes:Body{margin

13、:0px;padding:0px;text-align:center;}#content{margin-left:auto;margin-right:auto;width:400px;}TwolinesandonecolumnHerearethequotes:Body{margin:0px;padding:0px;t

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。