CSS实例:三列自适应等高且中列宽度自适应_DIV+CSS实例
教程Tag:暂无Tag,欢迎添加,赚取U币!
缂傚倸鍊搁崐鎼佸磹妞嬪海鐭嗗ù锝堫嚉濞差亝鏅濋柛灞炬皑閸旂數绱撴担鎻掍壕闂佺浜顤獵MS闂傚倷娴囧畷鐢稿窗閹扮増鍋¢柕澶堝剻濞戞ǚ鏀介悗锝冨妷閸嬫捇宕掗悙鏌ュ敹闂佸搫娲ㄩ崑鐐烘倵椤掆偓閳规垿鎮欓崣澶樻!闂佹悶鍔庨崰鏍ь嚕婵犳碍鏅搁柨鐕傛嫹濠电姷鏁搁崑鐐哄垂鐠轰警娼栭悷娆忓閻濆爼鏌涢埄鍐槈闁绘挻锕㈤弻鈥愁吋鎼粹€崇闂佹娊鏀辩敮锟犲蓟閵娾晜鍋嗛柛灞剧☉椤忥拷 缂傚倸鍊搁崐椋庣矆娓氣偓钘濋梺顒€绉寸粣妤呮煙闁箑澧鹃柤鏉挎健閺屾盯濡烽鐓庮潻缂備讲鍋撳鑸靛姈閻撳啴鏌曟径鍫濆闁绘繍浜弻锝呪攽閹炬潙顏� 闂傚倸鍊搁崐椋庢閿熺姴纾婚柛鏇ㄥ瀬閸ャ劍缍囬柍鍝勫暟椤︻垱绻濋姀锝嗙【闁哄牜鍓熷畷妤€饪伴崼鐔哄幐闂佹悶鍎崝宥夋儍閹达附鈷掑璺猴功鏁堥梺鍝勮閸婃牕岣胯箛娑樜╅柨鏃傜帛椤ユ稓绱撻崒娆戝妽闁哥偛顭烽獮蹇涙晸閿燂拷 闂傚倸鍊风粈渚€骞栭锕€鐤柣妤€鐗婇崣蹇涙煙缂併垹鏋涙俊鐐扮矙閺屸€愁吋鎼粹€茬敖闂佸憡顨嗙喊宥囨崲濞戙垹骞㈡俊顖濐嚙闂夊秴鈹戦鍡欑ɑ闁告梹顨婇崺鈧い鎺戝枤濞兼劙鏌熼鑲╁煟鐎规洘娲熼弻鍡楊吋閸涱垳鍘梻浣芥硶閸o箓骞忛敓锟�,闂傚倸鍊峰ù鍥儍椤愶箑绀嬫い鎰╁灩琚橀梻浣筋嚙濮橈箓锝炴径瀣濠电姴鍋嗛崵鏇㈡煕椤愶絾绀€缂佲偓閸愨斂浜滈柡鍌氱仢閹垶銇勮箛鏇炴瀾缂佺粯鐩獮瀣倷閺夋垹娈ら梻浣呵归鍡涘箲閸パ屾綎闁告繂瀚ч弸搴ㄦ煙椤栧棗瀚禍顏堟⒒娴e憡鍟為柣鐔村劤閹广垹螣娓氼垰娈ㄦ繝鐢靛У绾板秹寮查幖浣圭叆闁绘洖鍊圭€氾拷!
三列自适应等高且中列宽度自适应的CSS布局实例,作者silence应用了很多HACK进行代码编写。IE6是主要出现问题的浏览器,希望在以后的发展中,IE6与标准不再协调的事情不要再次发生。我们看代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>三列自适应等高且中列宽度自适应 - www.mb5u.com</title>
<style type="text/css">
a{ color:#30C;}
.wrap{overflow:hidden;}
.left{width:250px;float:left; background:#FC9;}
.right{width:250px;float:right;background:#FC9;}
.center{ background:#FC0;_float:left;/* ie6 hack*/ overflow:hidden;}
.row{margin-bottom:-10000px;padding-bottom:10000px;}
</style>
</head>
<body>
<div class="wrap">
<div class="left row"><a href="#">www.mb5u.com</a></div>
<div class="right row">
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
</div>
<div class="center row">
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<a href="http://www.mb5u.com/">www.mb5u.com</a><br />
<span style="float:right; position:relative;"> </span> <!--for ie6-->
</div>
</div>
</body>
</html>
查看运行效果:
代码调试框 [www.mb5u.com]
本文作者:silence
相关DIV+CSS实例:
- 相关链接:
- 教程说明:
DIV+CSS实例-CSS实例:三列自适应等高且中列宽度自适应
。