哪位大神幫我看看loding那張圖片為什么不居中,而且一直有,這是則么么回事
<!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>無標(biāo)題文檔</title>
<link href="css/main1.css" type="text/css" rel="stylesheet" />
<script src="js/myfocus-2.0.1.min.js" type="text/jscript" ></script>
<script src="js/mf-pattern/mF_fancy.js" type="text/jscript"></script>
<link href="js/mf-pattern/mF_fancy.css" type="text/css" rel="stylesheet" />
<script type="text/jscript">
myFocus.set({id:'picBox'})
</script>
</head>
<body>
?<div class="wrap">
? ? ?<div class="top">
? ? ? ? <img src="img/logo.jpg" alt="慕課網(wǎng)"/>
? ? ? ? <ul>
? ? ? ? ? ?<li><a href="#">首頁</a></li>
? ? ? ? ? ?<li><a href="#">產(chǎn)品特色</a></li>
? ? ? ? ? ?<li><a href="#">解決方案</a></li>
? ? ? ? ? ?<li><a href="#">產(chǎn)品價(jià)格</a></li>
? ? ? ? ? ?<li><a href="#">幫助中心</a></li>
? ? ? ? ? ?<li><a href="#">關(guān)于我們</a></li>
? ? ? ? </ul>
? ? ? ??
? ? ?</div><!--頭部-->
? ? ?<div class="ad" id="picBox">
? ? ? ? ?<div><img src="img/loading.gif" alt="加載中" /></div>
? ? ? ? ?<div class="pic">
? ? ? ? ? ? <ul>
? ? ? ? ? ? ? ?<li><img src="img/ad2.jpg" /></li>
? ? ? ? ? ? ? ?<li><img src="img/ad3.jpg" /></li>
? ? ? ? ? ? ? ?<li><img src="img/ad4.jpg" /></li>
? ? ? ? ? ? </ul>
? ? ? ? ?</div>
? ? ?</div>
?</div>
</body>
</html>
2015-12-07
你可以試試絕對(duì)居中
2015-12-06
css 有兩種居中方法?text-align:center 和 margin:0 auto。你可以去看一下別人寫的這兩種方法的博客
2015-12-06
但有一個(gè)例子沒加寬度也行,這是怎么回事
2015-12-06
我加了個(gè)寬度好了
2015-12-06
@charset "utf-8";
/* CSS Document */
*{
padding:0;
margin:0;
}
.wrap {
width:1000px;
background-color:#FFF;
font-size:12px;
margin:0 auto;
}
.top {
width:100%;
height:50px;
}
.top img{
display:block;
float:left;
width:200px;
}
.top ul li {
float:left;
list-style-type:none;
}
.top a{
width:120px;
height:70px;
display:block;
text-align:center;
line-height:70px;
font-size:16px;
font-family:"Microsoft YaHei UI";
}
.top a:link,.top a:visited{
text-decoration:none;
color:#000;
}
.top a:hover,.top a:active{
color:#000;
background-color:#BE3948;
text-decoration:none;
}
.ad {
margin-top:25px;
height:310px;
width:100%;
overflow:hidden;
}
2015-12-06
你的css代碼也放出來啊