Javascript 引导3粘贴
我一直在玩一个,有麻烦的“粘贴插件”,它允许固定位置浮动酒吧 请找一把小提琴来显示我的烦恼。基本上,右侧按钮是浮动的,但是当应用Javascript 引导3粘贴,javascript,css,twitter-bootstrap,twitter-bootstrap-3,Javascript,Css,Twitter Bootstrap,Twitter Bootstrap 3,我一直在玩一个,有麻烦的“粘贴插件”,它允许固定位置浮动酒吧 请找一把小提琴来显示我的烦恼。基本上,右侧按钮是浮动的,但是当应用position:fixed时,从网格系统继承的宽度和偏移样式似乎消失了 这是我的代码: <div class='container'> <div class='row'> <div class='col-span-8'> <legend>Lorem</legend&g
position:fixed
时,从网格系统继承的宽度和偏移样式似乎消失了
这是我的代码:
<div class='container'>
<div class='row'>
<div class='col-span-8'>
<legend>Lorem</legend>
<div>[Large amounts of text]</div>
</div>
<div class='col-span-4 well' data-spy='affix' data-offset-top='50'>
<div class='btn btn-large btn-danger col-span-12'>This is fixed</div>
</div>
</div>
</div>
洛勒姆
[大量文本]
这是固定的
我做错了什么?(我知道Bootstrap 3仍在积极开发中,但我希望有人对此有所了解。)数据偏移量top='50'添加类
粘贴top
。此类在bootstrap.css中没有定义。滚动页面后,类粘贴
替换类粘贴顶部
<代码>粘贴定义固定位置。这导致粘贴的div显示不同
也许将您的代码更改为如下所示更符合预期。注意:在这种情况下,粘贴的div不会显示在小屏幕上
<div class='container'>
<div class='row'>
<div class='col-span-8'>
<legend>Lorem</legend>
<div>[Large amounts of text]</div>
</div>
<div class='col-span-4'>
<div class="well col-span-4" data-spy='affix'>
<div class='btn btn-large btn-danger col-span-12'>This is fixed</div>
</div>
</div>
</div>
</div>
洛勒姆
[大量文本]
这是固定的
请您提供一个提琴,我无法让您的解决方案工作。自发布后,Bootstrap 3的标记发生了一些变化:新示例-