大佬教程收集整理的这篇文章主要介绍了twitter-bootstrap – 使用Twitter Bootstrap Affix溢出侧边栏,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
问题演示:http://www.codeply.com/go/DvcRXkeFZa
<div class="container"> <div class="row"> <div class="col-md-3 column"> <ul id="sidebar" class="well nav nav-stacked" data-spy="affix" data-offset-top="130"> <li><a href="#software"><b>Software</b></a></li> <li><a href="#features">Features</a></li> <li><a href="#benefits">Benefits</a></li> <li><a href="#costs">Costs</a></li> </ul> </div> <div class="col-md-9 column"> <h1>Blah,blah,blah</h1> <hr> <a class="anchor3" id="top" name="software"></a> <p> content here that scrolls... </p> </div> </div> </div>
所以你需要一些CSS for affix来设置元素固定时的宽度.如:
#sidebar.affix { position: fixed; top: 0; width:225px; }
Bootply演示:http://bootply.com/73864
关于Bootstrap词缀的相关回答:
How to create a sticky left sidebar menu using bootstrap 3?
Twitter-bootstrap 3 affixed sidebar overlapping content when window resized and also footer
以上是大佬教程为你收集整理的twitter-bootstrap – 使用Twitter Bootstrap Affix溢出侧边栏全部内容,希望文章能够帮你解决twitter-bootstrap – 使用Twitter Bootstrap Affix溢出侧边栏所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。