如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
下沙淘宝摄影浩图瀚视教你如何让CSS自动调整宽度!很多朋友在问CSS中自动调整宽度不会,下面浩图瀚视就教大家如何使用。以下是我编写的一些代码,仅供参考!需要把链接、内容自己改掉!<html><head><metahttp-equiv="Content-Type"content="text/html;charset=UTF-8"/><title>完美的自适应宽度DIV+CSS布局</title>*{margin:0;padding:0;}body{font-size:62.5%;background:url(images/stripe.png)repeat;}p,li{font:1.2em/1.8emTahoma,sans-serif;margin-bottom:10px;}h1{font:2.0emTahoma,sans-serif;color:white;height:0px;}h2{font:1.8emTahoma,sans-serif;color:green;margin-bottom:10px;}ul{margin-left:25px;}img{border:none;}#page-wrap{background:white;min-width:780px;max-width:1260px;margin:10pxauto;}#page-wrap#inside{margin:10px10px0px10px;padding-top:10px;padding-bottom:10px;}#main-content{background:url(images/left-sidebar.gif)repeat-ywhite;padding-left:230px;padding-top:20px;}#header{background:#267f23;text-align:center;}#left-sidebar{width:150px;float:left;padding-left:15px;padding-top:20px;}#footer{background:#267f23;text-align:center;padding-top:20px;padding-bottom:20px;color:white;}#page-wrap{width:expression(document.body.clientWidth<782?"780px":document.body.clientWidth>1262?"1260px":"auto");}<linkrel="stylesheet"type="text/css"href="style.css"/><!--[ifltIE7]><linkrel="stylesheet"type="text/css"href="style-ie.css"/><![endif]--></head><body><divid="page-wrap"><divid="inside"><divid="header"><ahref="http://www.hthsart.com/"><imgsrc="images/perfectfluidwidthheader.gif"alt="header"/></a></div><divid="left-sidebar"><p>杭州浩图瀚视影像艺术有限公司是一家集商业摄影、平面设计、影视广告、品牌策划为一体的综合型广告公司。公司70%以上员工具有影视、设计、摄影专业硕士以上学历,并具备多年上海、北京、杭州等地相关行业的丰富实战经验。</p></div><divid="main-content"><h2>Whyisthislayout"perfect"?</h2><ul><li>Worksinallmajorbrowsers</li><li><strong>Shrinks</strong>to780px<br/>Thisaccomodatesuserswith800x600resolution,withnohorizontalscroll!</li><li><strong>Grows</strong>to1260px<br/>Thisaccomodatesuserswith1280x768resolutionandeverythinginbetween.</li><li>Thisaccomodates90%+ofallinternetusers.Youcould