Bootstrap 响应式布局
1、保证在窄屏时 需要折叠的内容必须包裹在带一个div内,并且为这个div加入collapse、navbar-collapse两个类名。最后为这个div添加一个 class类名或者 id名。 2、保证在窄屏时要显示的图标样式(固定写法): 1 <button class="navbar-toggle" type="button" data-toggle="collapse"> 2 <span class="sr-only">Toggle Navigation</span> 3 <span class="icon-bar"></span> 4 <span class="icon-bar"></span> 5 <span class="icon-bar"></span> 6 </button> 3、并为button添加data-target=".类名/#id名",究竞是类名还是id名呢?由 需要折叠的div来决定。 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>响应式导航条</title> <link rel="stylesheet" href="css/bootstrap.min.css"> <style type=