Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 当滚动超过某个点时,如何使引导目录移动?_Html_Css_Twitter Bootstrap_Tableofcontents - Fatal编程技术网

Html 当滚动超过某个点时,如何使引导目录移动?

Html 当滚动超过某个点时,如何使引导目录移动?,html,css,twitter-bootstrap,tableofcontents,Html,Css,Twitter Bootstrap,Tableofcontents,我已经将链接的目录添加到我的站点,它位于网页顶部约600px的位置。我想让它留在那里,直到我到达某个位置,然后和我一起滚动 <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="css

我已经将链接的目录添加到我的站点,它位于网页顶部约600px的位置。我想让它留在那里,直到我到达某个位置,然后和我一起滚动

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- Optional theme -->
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <!-- My CSS file -->
    <link rel="stylesheet" href="css/main.css"/>
    <!-- Open Sans Google Fonts -->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
<!-- Makes this page work on phones -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12 bg-cover-about">
                <div class="col-lg-12 nav-links-about">
                        <div class="col-xs-12 logo-about">
                            <a href="../beta/index.php">Profile</a>
                          <a href="../beta/work.php">Work</a>
                          <a class="active" href="../beta/contact.php">Contact</a>
                        </div>
                </div>
                <div class="col-xs-12 profile-about">
                    <h1>Here's a little bit about me.</h1>
                    <p> I am a designer currently working for the Boston Red Sox. I've had the privilege of working with organizations big to small and have had work featured in Boston Magazine and dailymail.co.uk.<br><br>
          If you’d like to get in touch, feel free to send me a message.</p>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-12 contact-form">
                <h1>Send me a note.</h1>
                <form name="contactForm" method="post" action="http://formspree.io/email@andrewtimosca.com">
                    <input type="text" name="name" placeholder='Name'><br>
                    <input type="text" name="email" placeholder='Email'><br>
                    <input type="text" name="subject" placeholder='Subject'><br>
                    <textarea name="message" placeholder='How can I help you?'></textarea><br>
                    <input class="button send" type="submit" value="Submit"/>
                </form>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12 col-xs-12 bg-footer">
                <div class="col-col-lg-12 col-xs-12 underliner">
                    <a href="../beta/index.php" title="View Profile">Profile</a>
                    <a href="../beta/work.php" title="View Profile">Work</a>
                    <a href="../beta/contact.php" title="View Profile">Contact</a>
                </div>
                <div class="col-col-lg-12 col-xs-12 social">
                    <p>You can also find me on <a class="social" href="https://www.behance.net/andrewtimosca" title="Behance"> Behance </a> and <a class="social" href="https://dribbble.com/AndrewTimosca" title="Dribbble">Dribbble</a>.</p>
                </div>
                <div class="col-col-lg-12 col-xs-12 copyright">
                    <p>Copyright 2016 Andrew Timosca</p>
                </div>
            </div>
        </div>
    </div>
</div>
    <!-- Jquery obove Bootstrap JS file -->
    <script src="js/jquery.min.js"></script>
    <!-- Latest compiled and minified JavaScript -->
    <script src="js/bootstrap.min.js"></script>
</body>
我曾尝试将
data spy=“affix”
更改为
data spy=“affix top”
,但当设置为那样时,一旦我滚动到页面顶部的位置,它就会将自身粘贴到页面底部,并完全被切断

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- Optional theme -->
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <!-- My CSS file -->
    <link rel="stylesheet" href="css/main.css"/>
    <!-- Open Sans Google Fonts -->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
<!-- Makes this page work on phones -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12 bg-cover-about">
                <div class="col-lg-12 nav-links-about">
                        <div class="col-xs-12 logo-about">
                            <a href="../beta/index.php">Profile</a>
                          <a href="../beta/work.php">Work</a>
                          <a class="active" href="../beta/contact.php">Contact</a>
                        </div>
                </div>
                <div class="col-xs-12 profile-about">
                    <h1>Here's a little bit about me.</h1>
                    <p> I am a designer currently working for the Boston Red Sox. I've had the privilege of working with organizations big to small and have had work featured in Boston Magazine and dailymail.co.uk.<br><br>
          If you’d like to get in touch, feel free to send me a message.</p>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-12 contact-form">
                <h1>Send me a note.</h1>
                <form name="contactForm" method="post" action="http://formspree.io/email@andrewtimosca.com">
                    <input type="text" name="name" placeholder='Name'><br>
                    <input type="text" name="email" placeholder='Email'><br>
                    <input type="text" name="subject" placeholder='Subject'><br>
                    <textarea name="message" placeholder='How can I help you?'></textarea><br>
                    <input class="button send" type="submit" value="Submit"/>
                </form>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12 col-xs-12 bg-footer">
                <div class="col-col-lg-12 col-xs-12 underliner">
                    <a href="../beta/index.php" title="View Profile">Profile</a>
                    <a href="../beta/work.php" title="View Profile">Work</a>
                    <a href="../beta/contact.php" title="View Profile">Contact</a>
                </div>
                <div class="col-col-lg-12 col-xs-12 social">
                    <p>You can also find me on <a class="social" href="https://www.behance.net/andrewtimosca" title="Behance"> Behance </a> and <a class="social" href="https://dribbble.com/AndrewTimosca" title="Dribbble">Dribbble</a>.</p>
                </div>
                <div class="col-col-lg-12 col-xs-12 copyright">
                    <p>Copyright 2016 Andrew Timosca</p>
                </div>
            </div>
        </div>
    </div>
</div>
    <!-- Jquery obove Bootstrap JS file -->
    <script src="js/jquery.min.js"></script>
    <!-- Latest compiled and minified JavaScript -->
    <script src="js/bootstrap.min.js"></script>
</body>

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- Optional theme -->
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <!-- My CSS file -->
    <link rel="stylesheet" href="css/main.css"/>
    <!-- Open Sans Google Fonts -->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
<!-- Makes this page work on phones -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12 bg-cover-about">
                <div class="col-lg-12 nav-links-about">
                        <div class="col-xs-12 logo-about">
                            <a href="../beta/index.php">Profile</a>
                          <a href="../beta/work.php">Work</a>
                          <a class="active" href="../beta/contact.php">Contact</a>
                        </div>
                </div>
                <div class="col-xs-12 profile-about">
                    <h1>Here's a little bit about me.</h1>
                    <p> I am a designer currently working for the Boston Red Sox. I've had the privilege of working with organizations big to small and have had work featured in Boston Magazine and dailymail.co.uk.<br><br>
          If you’d like to get in touch, feel free to send me a message.</p>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-12 contact-form">
                <h1>Send me a note.</h1>
                <form name="contactForm" method="post" action="http://formspree.io/email@andrewtimosca.com">
                    <input type="text" name="name" placeholder='Name'><br>
                    <input type="text" name="email" placeholder='Email'><br>
                    <input type="text" name="subject" placeholder='Subject'><br>
                    <textarea name="message" placeholder='How can I help you?'></textarea><br>
                    <input class="button send" type="submit" value="Submit"/>
                </form>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12 col-xs-12 bg-footer">
                <div class="col-col-lg-12 col-xs-12 underliner">
                    <a href="../beta/index.php" title="View Profile">Profile</a>
                    <a href="../beta/work.php" title="View Profile">Work</a>
                    <a href="../beta/contact.php" title="View Profile">Contact</a>
                </div>
                <div class="col-col-lg-12 col-xs-12 social">
                    <p>You can also find me on <a class="social" href="https://www.behance.net/andrewtimosca" title="Behance"> Behance </a> and <a class="social" href="https://dribbble.com/AndrewTimosca" title="Dribbble">Dribbble</a>.</p>
                </div>
                <div class="col-col-lg-12 col-xs-12 copyright">
                    <p>Copyright 2016 Andrew Timosca</p>
                </div>
            </div>
        </div>
    </div>
</div>
    <!-- Jquery obove Bootstrap JS file -->
    <script src="js/jquery.min.js"></script>
    <!-- Latest compiled and minified JavaScript -->
    <script src="js/bootstrap.min.js"></script>
</body>
基本上,我希望得到与此相同的效果:

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- Optional theme -->
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <!-- My CSS file -->
    <link rel="stylesheet" href="css/main.css"/>
    <!-- Open Sans Google Fonts -->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
<!-- Makes this page work on phones -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12 bg-cover-about">
                <div class="col-lg-12 nav-links-about">
                        <div class="col-xs-12 logo-about">
                            <a href="../beta/index.php">Profile</a>
                          <a href="../beta/work.php">Work</a>
                          <a class="active" href="../beta/contact.php">Contact</a>
                        </div>
                </div>
                <div class="col-xs-12 profile-about">
                    <h1>Here's a little bit about me.</h1>
                    <p> I am a designer currently working for the Boston Red Sox. I've had the privilege of working with organizations big to small and have had work featured in Boston Magazine and dailymail.co.uk.<br><br>
          If you’d like to get in touch, feel free to send me a message.</p>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-12 contact-form">
                <h1>Send me a note.</h1>
                <form name="contactForm" method="post" action="http://formspree.io/email@andrewtimosca.com">
                    <input type="text" name="name" placeholder='Name'><br>
                    <input type="text" name="email" placeholder='Email'><br>
                    <input type="text" name="subject" placeholder='Subject'><br>
                    <textarea name="message" placeholder='How can I help you?'></textarea><br>
                    <input class="button send" type="submit" value="Submit"/>
                </form>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12 col-xs-12 bg-footer">
                <div class="col-col-lg-12 col-xs-12 underliner">
                    <a href="../beta/index.php" title="View Profile">Profile</a>
                    <a href="../beta/work.php" title="View Profile">Work</a>
                    <a href="../beta/contact.php" title="View Profile">Contact</a>
                </div>
                <div class="col-col-lg-12 col-xs-12 social">
                    <p>You can also find me on <a class="social" href="https://www.behance.net/andrewtimosca" title="Behance"> Behance </a> and <a class="social" href="https://dribbble.com/AndrewTimosca" title="Dribbble">Dribbble</a>.</p>
                </div>
                <div class="col-col-lg-12 col-xs-12 copyright">
                    <p>Copyright 2016 Andrew Timosca</p>
                </div>
            </div>
        </div>
    </div>
</div>
    <!-- Jquery obove Bootstrap JS file -->
    <script src="js/jquery.min.js"></script>
    <!-- Latest compiled and minified JavaScript -->
    <script src="js/bootstrap.min.js"></script>
</body>
html

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- Optional theme -->
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <!-- My CSS file -->
    <link rel="stylesheet" href="css/main.css"/>
    <!-- Open Sans Google Fonts -->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
<!-- Makes this page work on phones -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12 bg-cover-about">
                <div class="col-lg-12 nav-links-about">
                        <div class="col-xs-12 logo-about">
                            <a href="../beta/index.php">Profile</a>
                          <a href="../beta/work.php">Work</a>
                          <a class="active" href="../beta/contact.php">Contact</a>
                        </div>
                </div>
                <div class="col-xs-12 profile-about">
                    <h1>Here's a little bit about me.</h1>
                    <p> I am a designer currently working for the Boston Red Sox. I've had the privilege of working with organizations big to small and have had work featured in Boston Magazine and dailymail.co.uk.<br><br>
          If you’d like to get in touch, feel free to send me a message.</p>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-12 contact-form">
                <h1>Send me a note.</h1>
                <form name="contactForm" method="post" action="http://formspree.io/email@andrewtimosca.com">
                    <input type="text" name="name" placeholder='Name'><br>
                    <input type="text" name="email" placeholder='Email'><br>
                    <input type="text" name="subject" placeholder='Subject'><br>
                    <textarea name="message" placeholder='How can I help you?'></textarea><br>
                    <input class="button send" type="submit" value="Submit"/>
                </form>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12 col-xs-12 bg-footer">
                <div class="col-col-lg-12 col-xs-12 underliner">
                    <a href="../beta/index.php" title="View Profile">Profile</a>
                    <a href="../beta/work.php" title="View Profile">Work</a>
                    <a href="../beta/contact.php" title="View Profile">Contact</a>
                </div>
                <div class="col-col-lg-12 col-xs-12 social">
                    <p>You can also find me on <a class="social" href="https://www.behance.net/andrewtimosca" title="Behance"> Behance </a> and <a class="social" href="https://dribbble.com/AndrewTimosca" title="Dribbble">Dribbble</a>.</p>
                </div>
                <div class="col-col-lg-12 col-xs-12 copyright">
                    <p>Copyright 2016 Andrew Timosca</p>
                </div>
            </div>
        </div>
    </div>
</div>
    <!-- Jquery obove Bootstrap JS file -->
    <script src="js/jquery.min.js"></script>
    <!-- Latest compiled and minified JavaScript -->
    <script src="js/bootstrap.min.js"></script>
</body>

你能给我们看一下你用的代码吗?不,不。我在本地拥有所有引导文件。我用我喜欢的菜单来编辑我的帖子。唯一的区别是,我尺寸上的蓝色区域占据了大约70%的屏幕。不幸的是,在没有看到代码的情况下,很难诊断像bootstrap这样的框架的问题。要么你丢失了一些代码,要么,更可能的是,你添加的一些代码有问题。这是怎么回事?请发布代码的相关HTML部分。传出链接在SO中没有永久性,不能用于进一步参考。