Twitter bootstrap 推特引导对移动设备来说太宽了

Twitter bootstrap 推特引导对移动设备来说太宽了,twitter-bootstrap,Twitter Bootstrap,我使用Twitter引导为我的网站做了一个简单的设计。代码如下: <!DOCTYPE html> <!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="pl-PL"> <![endif]--> <!--[if IE 7 ]> <html class="ie ie7 no-js" lang="pl-PL"> <![endif]--> <!--[if I

我使用Twitter引导为我的网站做了一个简单的设计。代码如下:

<!DOCTYPE html>

<!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="pl-PL"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie ie7 no-js" lang="pl-PL"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie ie8 no-js" lang="pl-PL"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie ie9 no-js" lang="pl-PL"> <![endif]-->
<!--[if gt IE 9]><!--><html class="no-js" lang="pl-PL"><!--<![endif]-->

<head>

    <meta charset="UTF-8">  
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">  
    <title></title> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="shortcut icon" href="http://localhost/images/fav.ico">
    <link rel="stylesheet" href="http://localhost/bootstrap.css">
    <link rel="stylesheet" href="http://localhost/style.css">

    <!--[if lt IE 9]>
    <script src="http://localhost/js/html5shiv.js"></script>
    <script src="http://localhost/js/respond.js"></script>
    <![endif]-->


    <link rel="alternate" type="application/rss+xml" title=" &raquo; Kanał z wpisami" href="http://localhost/feed/" />
<link rel="alternate" type="application/rss+xml" title=" &raquo; Kanał z komentarzami" href="http://localhost/comments/feed/" />
<link rel='stylesheet' id='contact-form-7-css'  href='http://localhost/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=3.2' type='text/css' media='all' />
<script type='text/javascript' src='http://localhost/wp-includes/js/jquery/jquery.js?ver=1.8.3'></script>
<style type="text/css">
sup {
    vertical-align: 60%;
    font-size: 75%;
    line-height: 100%;
}
sub {
    vertical-align: -10%;
    font-size: 75%;
    line-height: 100%;
}
.amp {
    font-family: Baskerville, "Goudy Old Style", "Palatino", "Book Antiqua", "Warnock Pro", serif;
    font-weight: normal;
    font-style: italic;
    font-size: 1.1em;
    line-height: 1em;
}
.caps {
    font-size: 90%;
}
.dquo {
    margin-left:-.40em;
}
.quo {
    margin-left:-.2em;
}
/* because formatting .numbers should consider your current font settings, we will not style it here */
</style>
    <style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
</head>

<body class="home blog">    
    <div id="wrap" class="container">
        <!-- #header -->
        <header id="header" class="span12">
            <div class="navbar">
                <div class="navbar-inner">
                    <div class="container">
                        <h1 class="brand"><a href="http://localhost"></a></h1>
                        <div class="nav-collapse collapse hidden-mobile">
                            <ul class="nav pull-right">
                                <li><a href="#about" title="O mnie">O mnie</a></li>
                                <li><a href="#showcase" title="Realizacje">Realizacje</a></li>
                                <li><a href="#contact" title="FAQ / Kontakt">FAQ i kontakt</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </header>
        <!-- /#header -->


<!-- #slider -->
<section id="slider" class="hidden-phone carousel slide">
    <div>
        <article class="item"></article>
        <article class="item"></article>
    </div>
</section>


    </div>

    <script type='text/javascript' src='http://localhost/wp-content/plugins/contact-form-7/includes/js/jquery.form.js?ver=3.09'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var _wpcf7 = {"loaderUrl":"http:\/\/192.168.1.2\/\/wp-content\/plugins\/contact-form-7\/images\/ajax-loader.gif","sending":"Wysy\u0142anie..."};
/* ]]> */
</script>
<script type='text/javascript' src='http://localhost/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=3.2'></script>
<script src="http://localhost/js/jquery.js"></script>
<script src="http://localhost/js/bootstrap.min.js"></script>
<script src="http://localhost/js/plugins.js"></script>
<script src="http://localhost/js/script.js"></script>

<!--

<script>

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXX-XX']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
-->

</body>

</html>

苏普{
垂直对齐:60%;
字体大小:75%;
线高:100%;
}
潜艇{
垂直对齐:-10%;
字体大小:75%;
线高:100%;
}
安培{
字体系列:巴斯克维尔,“古迪旧式”,“帕拉蒂诺”,“古董书”,“沃诺克专业版”,衬线;
字体大小:正常;
字体:斜体;
字体大小:1.1米;
线高:1米;
}
.帽子{
字体大小:90%;
}
D.现状{
左边距:-.40em;
}
现状{
左边距:-.2米;
}
/*因为格式化。数字应该考虑当前字体设置,我们不会在这里*样式。
.recentcomments a{display:inline!important;padding:0!important;margin:0!important;}
/* */
我确实在底部包含了Bootstrap的两个css文件(先组合成一个-Bootstrap.css文件,然后再组合成一个Bootstrap-responsive.css文件)和Bootstrap.js文件。但我有一个非常奇怪的问题(自从我使用推特引导以来第一次)——在我的手机上(华为Ascend),身体太宽(无论方向如何)。它似乎有一些填充物-所以我移除了
主体的填充物,但没有任何帮助。即使我删除CSS并只保留引导,问题仍然可见。

设置

.container { width: 100% !important } 
有帮助。我仍然不知道为什么会发生这种情况。

设置

.container { width: 100% !important } 

有帮助。我仍然不知道为什么会发生这种情况。

这是一个非常糟糕的解决方案。尝试将
.container
更改为
.container fluid
,看看会发生什么


将宽度设置为100%将给您带来其他麻烦…

这是一个非常糟糕的解决方案。尝试将
.container
更改为
.container fluid
,看看会发生什么


将宽度设置为100%会给您带来其他麻烦…

问题中没有指定引导版本,尽管它是在v3.0发布之前发布的

在任何情况下,如果有人碰巧遇到这个话题,并且对v3.x有同样的问题,下面是我所做的。YMMV取决于.container div是否直接位于下方


问题中没有指定引导版本,尽管它是在v3.0发布之前发布的

在任何情况下,如果有人碰巧遇到这个话题,并且对v3.x有同样的问题,下面是我所做的。YMMV取决于.container div是否直接位于下方


尝试将
.container
更改为
.container fluid
并将
添加为
的直接子级。container fluid

尝试将
.container
更改为
。container fluid
并将
添加为
.container fluid

的直接子级。您是否遇到同样的问题Bootstrap的演示页面,比如你手机上的这个?不,这就是问题所在。我在另外两部手机(三星、Galaxy 551和Galaxy II)上进行了检查,结果都是一样的。请尝试删除标题标签上的class=“span12”。。。你不在那一排,所以也许这就打破了它?那也不是它@ThomPorter。我已经设置了
.container{width:100%!important}
,这很有帮助。在你的手机上查看Bootstrap的演示页面时,你会遇到同样的问题吗?不,这就是问题所在。我在另外两部手机(三星、Galaxy 551和Galaxy II)上进行了检查,结果都是一样的。请尝试删除标题标签上的class=“span12”。。。你不在那一排,所以也许这就打破了它?那也不是它@ThomPorter。我已经设置了
.container{width:100%!important}
,它很有帮助。到目前为止,它是唯一有效的。如果您有任何想法如何避免将
容器设置为
100%
,我很想听听(真的,没有sarcarm:)。这是迄今为止唯一有效的方法。如果您有任何想法如何避免将
容器设置为
100%
我很想听听(真的,没有讽刺:)。