我在一个简单的HTML5,CSS3网站上使用bootstrap。(见这里:http://skyfistudio.com/project/fsc/)。有三个div应该是100%宽度。
它在桌面和所有浏览器中都很好看。但在iPhone中,它显示左对齐(请参阅附图)。我希望它能伸展100%。 iPhone视图在这里:
http://skyfistudio.com/project/fsc/hosting/
以下是第一次导航的代码:
ul.fnav
{
list-style-type:none;
margin:0 auto;
padding:0;
padding-top:8px;
padding-bottom:8px;
text-align:center;
margin-top:0px;
background-color:#3B5998;
width:100%;
}
ul.fnav li
{
display:inline;
}
ul.fnav a:link,ul.fnav a:visited
{
font-weight:normal;
color:#fff;
margin-left:10px;
font-size:13px;
text-align:center;
padding:6px;
margin-right:55px;
text-decoration:none;
text-transform:uppercase;
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
ul.fnav a:hover,a:active
{
color:#ccc;
}
答案 0 :(得分:1)
将它们放在<div class="container-fluid">...</div>
答案 1 :(得分:0)
在一个div中创建Both和image div,以便bot可以在一行中流动,并在custom.css中使用@ media-queries进行检查