阻止bootstrap将div移动到左边

Jon*_*yon 6 css css3 twitter-bootstrap

我在使用词缀属性后试图阻止我的右侧div向左移动.

任何iudea请问我这样做.你可以在这里看到问题,请向下滚动: -

http://monkeygetnews.jonathanlyon.com/bs.html

谢谢

Jponathan

Dav*_*roa 9

激活后,滚动间谍会添加类别词缀和位置:固定到它正在侦察的div.这种定位使div脱离正常流动,结果是它向左浮动.

解决方案是添加一些CSS样式以将其浮动到您想要的位置.在您的页面中,我认为它会是这样的:

.span3.affix{
position: fixed; /* to stop the div from scrolling */
top: 0;          /* to fix the div at the top its containing element */
right: 0;        /* to fix the div at the right of its containing element */
}
Run Code Online (Sandbox Code Playgroud)

您可能需要稍微玩这个以获得它想要的位置.重要的是,一旦你知道选择器(在这种情况下)是.span3.affix,它就很容易使用了.

祝好运!