Jquery 当我将div合并到另一个部分时,为什么会失去滚动效果?

Jquery 当我将div合并到另一个部分时,为什么会失去滚动效果?,jquery,html,scroll,scrollto,Jquery,Html,Scroll,Scrollto,这是我的网站: violetoeuvre.com 我做了一个测试页 我希望主页上书写部分的内容与滚动页面上的内容相同,但当我将其合并到home_writing div中时,滚动效果消失 我想在右上角的链接是固定的,并顺利滚动到写作部分的内容 我怀疑这个错误与div、类和id之间的关系有关,但我无法理解 以下是我的css: .home_writing { display: block; background: rgba(50,50,50,0); height: 1000px

这是我的网站:

violetoeuvre.com

我做了一个测试页

我希望主页上书写部分的内容与滚动页面上的内容相同,但当我将其合并到home_writing div中时,滚动效果消失

我想在右上角的链接是固定的,并顺利滚动到写作部分的内容

我怀疑这个错误与div、类和id之间的关系有关,但我无法理解

以下是我的css:

.home_writing {
    display: block;
    background: rgba(50,50,50,0);
    height: 1000px;
    text-align: left;
    overflow: scroll;
}

    /* CSS for the small boxes that will scroll inside a div */

    #small-box-container {
        border: 1px solid black;
        background: rgba(10,200,10,0);
        width: 980px;
        height: 2000px;
        overflow: scroll;
    }

 #small-box-links{
    position: fixed;
    margin-left: 700px;
    height: 150px;
 }

    .small-box {

        color: #fff;
        width: 980px;
        margin: 0 0 50px 0;
    }

    #small-box1 {
        background: blue;
    }

    #small-box2 {
        background: red;
        height: 500px;
    }

    #small-box3 {
        background: green;
    }

     #small-box4 {
        background: aqua;
    }
和html:

<div class="home_writing">
    <div id="small-box-container">
        <div id="small-box-links">
            <a href="#small-box1">deadspin</a>
            <a href="#small-box2">gawker</a>
            <a href="#small-box3">the awl</a>
            <a href="#small-box4">other</a>
        </div>
    </div>

    <div>
        <div id="small-box1" class="small-box"><h2>deadspin</h2>
            <h3>How Pat Summitt Ruined The Best Thing About Women's Basketball</h3>
                <p>In a kinder world, Geno 'n' Pat would be a sitcom about a bumbling male-female cop duo. Geno would cause trouble, and Pat would be very serious and by-the-book, and she'd occasionally trip on things. Alas, women's basketball is not that world.
                <a href="http://deadspin.com/5704435/how-pat-summitt-ruined-the-best-thing-about-womens-basketball">read</a>
                </p>
                <h3>Dropping In On The Demented Utopia Of The Gathering Of The Juggalos</h3>
                <p>ICP's version of hip hop—politically anti-racist, but very white and non-urban—is the escape plan for the kids who don't ever leave. The Gathering is an annual diversion. Of any of the things Juggalos hold dear, this is the one I might be able to understand now.On the other hand, I never sat with Juggalos in the high school cafeteria.
                <a href="http://deadspin.com/5831225/dropping-in-on-the-demented-utopia-of-the-gathering-of-the-juggalos">read</a></p>
                <h3>Starting In The Basement: A Day At Open Tryouts For The NBA's D-League</h3>
                <p> 
                One of the first things that Jay Larranaga, head coach of the Erie Bayhawks, tells the 35 players who have paid $150 apiece to possibly have a shot at maybe earning a spot on his NBA Development League team, is that they are not really talented. Well, he doesn't say it exactly like that.
                <a href="http://deadspin.com/5846103/starting-in-the-basement-a-day-at-open-tryouts-for-the-nbas-d+league"></a>read</p>
                <h3>Celebrating Serena Williams, Tennis Traditionalist</h3>
                <p>
                But what Serena reminded us is that, despite a year-long break from the sport, she still cares furiously about tennis, and about winning. This attitude, and this way of expressing it, was in no way unprecedented.
                <a href="http://deadspin.com/5839361/celebrating-serena-williams-tennis-traditionalist">read</a><p>
                <h3>The Graceful, Oversized Legacy of Yao Ming</h3>
                <p>The looming size of that body distracted us, at first, from considering what he could do with it. Yao did not start off great. He started off like a project.
                <a href="http://deadspin.com/5823208/the-graceful-oversized-legacy-of-yao-ming">read</a></p>
        </div>

        <div id="small-box2" class="small-box"><h2>gawker</h2>
            <h3>All the Girls Standing in the Line For the Rap Show&#58; Iggy Azalea’s Sudden Rise</h3>
                    <p>Of all of the self-reflective periods that hip hop has endured over the years, this one might be the most muddled: a culture that has spread far enough to reach a female teenager in Mullumbimby, Australia, and produce a viral video and an inevitable record deal is still doing its best gate-keeping job on a growing force of female rappers.
                    <a href="http://gawker.com/5916913/all-the-girls-standing-in-the-line-for-the-rap-show-iggy-azaleas-sudden-rise">read full article</a>
                    </p>
            <h3>Sexile in Guyville&#58; Lady Writers and the Male Celebrities They Profile</h3>
                    <p>The art of the form lies in a seamless two-step between writer and subject that is hard not to appreciate. Plenty of celebrity profiles suffer from the simple balance of an actor protecting an image, and the reporter duly packaging his or her cut-and-dry photo spread. The male-female profile knows no such limitations.
                    <a href="http://gawker.com/5893317/sexile-in-guyville-lady-writers-and-the-male-celebrities-they-profile">read full article</a>
                    </p>
        </div>

        <div id="small-box3" class="small-box"><h2>the awl</h2>
            <h3>Selling Herself Short&#58; The Miscontexualization of Nicki Minaj</h3>
            <p>Nicki Minaj's "Pink Friday" arrived just before this Thanksgiving. It could be difficult for anyone who is not a black female rapper (including me, a white female home-recording wannabe rapper) to understand that this is remarkable, and something to be celebrated, but I think Lin Que’s story provides some context. Minaj didn’t just release her first major album, she released the album that Lin Que—and a lot of other female rappers—once refused to record.
            <a href="http://www.theawl.com/2010/11/selling-herself-short-the-miscontexualization-of-nicki-minaj">read full article</a>
            </p>
            <h3>With the Ladies in the Back at an Odd Future Show</h3>
            <p>Their trick is deciding who gets to be in on the joke; for listeners sensitive to lyrics about rape or homophobia, the trick is deciding if you really want to be in on the joke in the first place. Young white men, Tyler masks strapped on, were clamoring for that right on Friday, while the women tried to find a place for themselves.
            <a href="http://www.theawl.com/2011/05/with-the-ladies-in-the-back-at-an-odd-future-show">read full article</a>
            </p>
            <h3>Kanye’s '808s'&#58; How A Machine Brought Heartbreak To Hip Hop</h3>
            <p>The immediate reaction to the album might have been similar to the one in Newport, Rhode Island in 1965, when Bob Dylan went electric at the Folk Festival. We don’t like drastic changes from the artists we’ve come to depend on for a certain kind of musical narrative, even if those artists happen to be going through drastic changes themselves.
            <a href="http://www.theawl.com/2011/09/kanye%E2%80%99s-808s-how-a-machine-brought-heartbreak-to-hip-hop">read full article</a>
            </p>
            <h3>"Make Me Proud": Does Drake Actually Care About Women?</h3>
            <p>But we’re already accustomed to chauvinism in hip hop; on Take Care, the women who are not Drake’s matriarchs are either treated like impassive, mindless listeners who need to be told they’ve made someone proud, or they need to be put in their place for doing him wrong. The “la da das" are only so distracting here.
            <a href="http://www.theawl.com/2011/11/make-me-proud-does-drake-actually-care-about-women">read full article</a>
            </p>
        </div>

        <div id="small-box4" class="small-box"><h2>other</h2>
            <h3>daily intel</h3>
            <h3>Kim’s Decision: How Kim Kardashian Made the Same Mistake As LeBron James</h3>
            <p>We may tolerate televised spectacles, but we’re affronted when they’re just as publicly unmasked. The interplay between audience and reality star acknowledges our complicity: We’re equal partners in the extravaganza and the collapse. And we don’t like to come out feeling like the chumps in that exchange.
            <a href="http://nymag.com/daily/intelligencer/2011/11/kims_decision_how_how_kim_kard.html">read full article</a>
            </p>
            <h3>sports illustrated</h3>
        </div>
    </div>

</div>

死旋
帕特·萨米特是如何毁掉女子篮球的最好的一面的
在一个更友善的世界里,Geno‘n’Pat将是一部关于一对笨手笨脚的男女警察的情景喜剧。吉诺会制造麻烦,帕特会非常严肃,严格地说,她偶尔会在一些事情上绊倒。唉,女子篮球不是那个世界。

顺便去看看Juggalos聚会的疯狂乌托邦 ICP版的嘻哈音乐在政治上是反种族主义的,但非常白人和非城市的,这是那些从不离开的孩子们的逃避计划。这次聚会是一年一度的消遣。在Juggalos珍视的任何事物中,这是我现在可能能够理解的。另一方面,我从来没有在高中食堂和Juggalos坐在一起。

从地下室开始:NBA D联赛公开选拔赛的一天 伊利湾鹰队主教练杰伊·拉拉纳加(Jay Larranaga)告诉35名球员的第一件事是,他们没有真正的天赋,他们每人支付150美元,可能有机会在他的NBA发展联盟球队中获得一席之地。嗯,他不是那样说的。 阅读

庆祝网球传统主义者瑟琳娜·威廉姆斯 但瑟琳娜提醒我们的是,尽管有一年的休息时间,她仍然非常关心网球和胜利。这种态度,以及这种表达方式,绝非史无前例。 姚明优雅、超大的遗产 那具尸体隐约可见的大小,一开始让我们无法考虑他能用它做什么。姚明开局并不好。他一开始就像一个项目。

呆子 所有站在说唱表演队伍中的女孩:;伊吉杜鹃花的突然崛起 在嘻哈多年来经历的所有自我反省时期中,这一时期可能是最混乱的:一种文化已经传播到了澳大利亚穆伦比比的一名女青少年手中,并且制作了一段病毒式的视频和一份不可避免的唱片交易,它仍然在为越来越多的女说唱歌手把关。

盖维尔的塞西尔:;女作家和他们描述的男性名人 形式的艺术在于作者和主体之间无缝的两步,这是很难不欣赏的。很多名人档案都受到演员保护形象的简单平衡和记者及时包装他或她的剪贴照片的影响。男性-女性形象不知道这样的限制。

锥子 卖空自己:;Nicki Minaj的误译 Nicki Minaj的“粉红星期五”就在感恩节前到达。对于任何不是黑人女说唱歌手的人(包括我,一位想在家录音的白人女说唱歌手)来说,很难理解这是一件了不起的事情,值得庆祝,但我认为林雀的故事提供了一些背景。Minaj不仅发行了她的第一张主要专辑,她还发行了林雀和许多其他女性说唱歌手曾经拒绝录制的专辑。

在一场奇怪的未来秀上,女士们坐在后面 他们的伎俩是决定谁能参与到这个笑话中来;对于那些对强奸或恐同症歌词敏感的听众来说,关键在于首先决定你是否真的想参与其中。周五,戴着泰勒面具的年轻白人男子叫嚣着要得到这个权利,而妇女们则试图为自己找到一个地方。

坎耶的"808s"和#58 ;;机器如何给嘻哈带来心碎 对这张专辑的直接反应可能与1965年罗德岛纽波特的那张专辑相似,当时鲍勃·迪伦在民俗节上用电。我们不喜欢我们依赖的艺术家在某种音乐叙事上的剧变,即使这些艺术家自己也在经历剧变。

“让我骄傲”:德雷克真的在乎女人吗? 但我们已经习惯了嘻哈音乐中的沙文主义;在《保重》一书中,那些不是德雷克的女家长的女性要么被当作冷漠、无知的听众对待,她们需要被告知自己让某人感到骄傲,要么因为做错了德雷克而被置于自己的位置。“拉达达斯”在这里只会让人分心。

其他 每日英特尔 基姆的决定:金·卡戴珊犯了和勒布朗·詹姆斯一样的错误 我们可能会容忍电视上的奇观,但当它们被公开揭露时,我们会受到冒犯。观众和真人秀明星之间的相互作用承认了我们的共谋:在这场盛会和崩溃中,我们是平等的伙伴。而我们