标题:css的请问:这个css图片走廊怎么居中
只看楼主
jin522
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2010-10-11
结帖率:60%
已结贴  问题点数:20 回复次数:2 
css的请问:这个css图片走廊怎么居中
程序代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 

"http://www. xmlns="http://www. xml:lang="en">
<head>
<style type="text/css">
#info {
position:relative;
margin:0px auto;
background:#fff url(../../updata/thumb2.jpg) 275px 44px no-repeat;} 

#scrollbox {
width:400px;
height:80px;
background:#f4f4f4;
overflow:auto;
border:1px solid #aaa;
margin-left:175px;
margin-top:70px;} 

a.gallery, a.gallery:visited {
display:block; 
color:#000; 
ext-decoration:none;
border:1px solid #000;
width:75px;
height:47px;
margin:3px;
float:left;} 

a.slidea {background:url(../../updata/thumb2.jpg);}
a.slideb {background:url(../../updata/thumb3.jpg);}
a.slidec {background:url(../../updata/thumb4.jpg);}
a.slided {background:url(../../updata/thumb5.jpg);}
a.slidee {background:url(../../updata/thumb6.jpg);}
a.slidef {background:url(../../updata/thumb7.jpg);}
a.slideg {background:url(../../updata/thumb8.jpg);}
a.slideh {background:url(../../updata/thumb9.jpg);}
a.slidei {background:url(../../updata/thumb10.jpg);}
a.slidej {background:url(../../updata/thumb11.jpg);} 

a.gallery span {
display:block;
position:absolute;
left:150px;
top:-1px;
width:1px;
height:1px;
overflow:hidden;
background:#efedec;
z-index:100;} 

a.gallery:hover {white-space:normal; border:1px solid #fff;}
a.gallery:hover img {border:1px solid #000; z-index:100;}
a.gallery:active img, a.gallery:focus img {border:1px solid #000; z-index:50;} 

a.gallery:hover span {
display:block;
position:absolute;
width:402px;
height:290px;
top:39px;
left:170px;
padding:5px;
font-style:italic;
color:#000;
background:#fff;
z-index:100;} 

a.gallery:active {border:1px solid #eee;}
a.gallery:active span, a.gallery:focus span {
display:block;
position:absolute;
width:402px;
height:290px;
top:39px;
left:170px;
padding:5px;
font-style:italic;color:#000; background:#fff; z-index:50;}
#thumbs {width:840px; height:60px;}
#pad {height:310px; width:100px;}
<!--[if lte IE 6]>
<style>
#ads {display:none;}
#adsie {clear:both; text-align:center; width:750px; margin-top:10px;}
</style>
<![endif]-->
</style>
</head>
<body>
<div id="info">
<div id="pad"></div>
<div class="slidek"></div>
<div id="scrollbox">
<div id="thumbs">
<a class="gallery slidea" href="#nogo" title="Fishes">
<span><img src="../../updata/pic2.jpg" alt="Fishes" title="Fishes" />
<br />pic2.jpg<br />Photographs courtesy of  class="gallery slideb" href="#nogo" title="Funnels">
<span><img src="../../updata/pic3.jpg" alt="Funnels" title="Funnels" />
<br />pic3.jpg<br />Photographs courtesy of  class="gallery slidec" href="#nogo" title="Vases">
<span><img src="../../updata/pic4.jpg" alt="Vases" title="Vases" />
<br />pic4.jpg<br />Photographs courtesy of  class="gallery slided" href="#nogo" title="Window">
<span><img src="../../updata/pic5.jpg" alt="Window" title="Window" />
<br />pic5.jpg<br />Photographs courtesy of  class="gallery slidee" href="#nogo" title="Cascade">
<span><img src="../../updata/pic6.jpg" alt="Cascade" title="Cascade" />
<br />pic6.jpg<br />Photographs courtesy of  class="gallery slidef" href="#nogo" title="Cascade">
<span><img src="../../updata/pic7.jpg" alt="Flowers" title="Flowers" />
<br />pic7.jpg<br />Photographs courtesy of  class="gallery slideg" href="#nogo" title="Cascade">
<span><img src="../../updata/pic8.jpg" alt="Butterfly" title="Butterfly" />
<br />pic8.jpg<br />Photographs courtesy of  class="gallery slideh" href="#nogo" title="Cascade">
<span><img src="../../updata/pic9.jpg" alt="Birds" title="Birds" />
<br />pic9.jpg<br />Photographs courtesy of  class="gallery slidei" href="#nogo" title="Cascade">
<span><img src="../../updata/pic10.jpg" alt="Shells" title="Shells" />
<br />pic10.jpg<br />Photographs courtesy of  class="gallery slidej" href="#nogo" title="Cascade">
<span><img src="../../updata/pic11.jpg" alt="Fishing" title="Fishing" />
<br />pic11.jpg<br />Photographs courtesy of 
搜索更多相关主题的帖子: css 走廊 
2010-12-22 16:56
五当家
Rank: 12Rank: 12Rank: 12
等 级:火箭侠
威 望:2
帖 子:1112
专家分:3674
注 册:2010-10-20
得分:14 
前台的代码怎么也这么多.看来是我理解错了.

经验积累中............
2010-12-23 22:58
twtrwr
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:39
专家分:102
注 册:2011-3-31
得分:0 
margin:0 auto ;
text-align:center

男人无所畏惧,应越战越勇
2011-04-04 15:15



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-329614-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.092135 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved