我似乎无法删除页脚侧面的空白,如图所示。我试过宽度:100%;我用谷歌搜索后几乎所有的方法都在线。这是页脚的html和css
.container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
margin-bottom: 0px;
width: 100%;
}
.footer{
background:url(../images/pw_maze_black_2X.png) left top repeat;
width: 100%;
padding-left: 0px;
padding-right: 0px;
}
.footer-logo{
margin:15px auto 35px;
width: 76px;
}
.copyright{
color:#cccccc;
font-size:14px;
display:block;
text-align:center;
}
.copyright a{
color:#7cc576;
font-weight:600;
text-decoration: none;
transition:all 0.3s ease-in-out;
-moz-transition:all 0.3s ease-in-out;
-webkit-transition:all 0.3s ease-in-out;
}
.copyright a:hover {
color: #fff;
}

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<footer class="footer">
<div class="container">
<div class="footer-logo"><a href="#"><img src="images/footer-logo.png" alt=""></a></div>
<span class="copyright">Copyright © 2015 | <a href="http://bootstraptaste.com/">Bootstrap Themes</a> by BootstrapTaste</span>
</div>
</footer>
&#13;
我能尝试的其他任何事情吗?
答案 0 :(得分:0)
这是你想要的吗?
.container {
padding-right: 0px;
padding-left: 0px;
margin-right: auto;
margin-left: auto;
margin-bottom: 0px;
width: 100%;
}
.footer{
background:url(../images/pw_maze_black_2X.png) left top repeat;
width: 100%;
padding-left: 0px;
padding-right: 0px;
}
.footer-logo{
margin:0px auto;
width: 76px;
}
.copyright{
color:#cccccc;
font-size:14px;
display:block;
text-align:center;
}
.copyright a{
color:#7cc576;
font-weight:600;
text-decoration: none;
transition:all 0.3s ease-in-out;
-moz-transition:all 0.3s ease-in-out;
-webkit-transition:all 0.3s ease-in-out;
}
.copyright a:hover {
color: #fff;
}