如何在Bootstrap中更改对象的位置

时间:2014-07-04 04:09:04

标签: html twitter-bootstrap position location

我正在尝试将动态地图添加到我的网站,但它会被导航栏切断并被页面底部切断。我尝试使用一个容器,但导航栏仍在切断它看起来更糟糕。下面是网站:http://whynotmine.net/DynMap.html#

这是代码:

<html>
<head>
    <title>DynamicMap</title>
    <meta name="viewport" content="width+device-width, initial-scale=1.0">
    <link href = "css/bootstrap.min.css" rel = "stylesheet">
    <link href = "css/styles.css" rel = "stylesheet">
</head>
<body>

<head>
    <link rel="stylesheet" type="text/css" href="styles.css">
</head> 

    <div class = "navbar navbar-inverse navbar-fixed-top">
        <div class = "container">

            <a href = "http://whynotmine.net" class = "navbar-brand">WhyNotMine</a>

            <button class = "navbar-toggle" data-toggle = "collapse" data-target = ".navHeaderCollapse">
                <span class = "icon-bar"></span>
                <span class = "icon-bar"></span>
                <span class = "icon-bar"></span>
            </button>

            <div class = "collapse navbar-collapse navHeaderCollapse">

                <ul class = "nav navbar-nav navbar-right">

                    <li><a href = "http://whynotmine.net">Home</a></li>
                    <li><a href = "http://whynotmine.net/DynMap.html#">DynMap</a></li>
                    <li><a href = "http://whynotmine.net/Polls.html#">Polls</a></li>
                    <li><a href = "http://whynotmine.net/Donations.html#">Donations</a></li>
                    <li><a href = "http://whynotmine.net/About.html#">About</a></li>

                </ul>

            </div>

        </div>
    </div>

        <iframe src="http://107.167.82.34:8123" width="100%" height="1000">
            <p>Your browser does not support iframes.</p>
        </iframe>

1 个答案:

答案 0 :(得分:0)

顶部导航栏很容易,这种行为在BS3文档http://getbootstrap.com/components/#navbar-fixed-top中有解释。

基本上你想添加......

body {
padding: 70px;
}

这将解决顶部导航栏的问题,遗憾的是,我并不真正了解您从哪里来到页面底部被切断的地方?除了导航栏和错误的堆加载之外,我认为这里没有真正的问题。

我专注于整理错误,应该排除问题或减少导致问题的原因。