最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

CSS垂直居中網(wǎng)頁布局實現(xiàn)的5種方法

互聯(lián)網(wǎng)   發(fā)布時間:2009-04-02 19:37:54   作者:佚名   我要評論
網(wǎng)頁制作Webjx文章簡介:利用 CSS 來實現(xiàn)對象的垂直居中有許多不同的方法,比較難的是選擇那個正確的方法。我下面說明一下我看到的好的方法和怎么來創(chuàng)建一個好的居中網(wǎng)站。 利用 CSS 來實現(xiàn)對象的垂直居中有許多不同的方法,比

利用 CSS 來實現(xiàn)對象的垂直居中有許多不同的方法,比較難的是選擇那個正確的方法。我下面說明一下我看到的好的方法和怎么來創(chuàng)建一個好的居中網(wǎng)站。
哪個方法?
我最喜歡的是方法三,缺點不多。因為 content 會清除浮動,所以可以在它上面放置別的元素,并且當窗口縮放時,
居中的 content 不會把另外的元素蓋住???例子。
<div id="top">
<h1>Title</h1>
</div>
<div id="content">
Content Here</div>

#floater{float:left; height:50%; margin-bottom:-120px;}
#top{float:right; width:100%; text-align:center;}
#content{clear:both; height:240px; position:relative;}

現(xiàn)在你知道是怎么回事了,現(xiàn)在我們開始創(chuàng)建一個簡單但是有趣的網(wǎng)站。最終的樣子是這樣的:

步驟一
以語義化標簽開始是很好的。下面是我們的頁面構成:
#floater/*把 content 置中*/
#contred/*centre 盒*/
#side
#logo
#nav/*無序列表*/
#content
#bottom/*放置版權等*/

這是我用到的 xhtml 代碼:
A Centred Company
<div id="centered">
<div id="side">
<div id="logo">
<strong><span>A</span> Company</strong></div>
<ul id="nav">
<li><a href="#">Home</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">About</a></li>
</ul>
</div>
<div id="content">
<h1>Page Title</h1>
Holisticly re-engineer value-added outsourcing after process-centric collaboration and idea-sharing.
Energistically simplify impactful niche markets via enabled imperatives.
Holisticly predominate premium innovation after compelling scenarios.
Seamlessly recaptiualize high standards in human capital with leading-edge manufactured products.
Distinctively syndicate standards compliant schemas before robust vortals.
Uniquely recaptiualize leveraged web-readiness vis-a-vis out-of-the-box information.
<h2>Heading 2</h2>
Efficiently embrace customized web-readiness rather than customer directed processes.
Assertively grow cross-platform imperatives vis-a-vis proactive technologies.
Conveniently empower multidisciplinary meta-services without enterprise-wide interfaces.
Conveniently streamline competitive strategic theme areas with focused e-markets.
Phosfluorescently syndicate world-class communities vis-a-vis value-added markets.
Appropriately reinvent holistic services before robust e-services.</div>
</div>
<div id="bottom">
Copyright notice goes here</div>

相關文章

最新評論

涿州市| 河北省| 隆化县| 灵台县| 怀远县| 许昌县| 南京市| 玉山县| 周宁县| 浮山县| 称多县| 石城县| 宁海县| 罗江县| 荣成市| 鄂伦春自治旗| 时尚| 和田县| 鄱阳县| 财经| 宁陵县| 搜索| 上高县| 贵阳市| 扶沟县| 怀安县| 高阳县| 东乡族自治县| 天祝| 化德县| 长海县| 衡水市| 霞浦县| 锦州市| 宁武县| 南开区| 贺兰县| 田林县| 高青县| 东山县| 怀远县|