我已经将我的导航栏导航链接构建为向右拉(这是我想要的)但是在折叠时链接也向右拉,看起来很奇怪(见图).我想弄清楚如何修改代码,以便在折叠时向左拉导航.演示


如果你能提供帮助,请告诉我.
我的模板代码和特定于站点的css如下:
![<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link href="/static/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="/static/css/site-specific.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar- collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse pull-right">
<ul class="nav navbar-nav pull-left">
<li><a href="{{ url_for('index') }}">Home</a></li>
<li><a href="{{ url_for('about') }}">About</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Browse by …Run Code Online (Sandbox Code Playgroud) MYSQL返回一个数组,如下所示.我正在使用column:'id_parent'来自我引用表来创建层次结构.因此,'id'为2的条目可以是'id_parent'为2的任何条目的父级,依此类推.
Array
(
[1] => Array
(
[id] => 2
[name] => About
[id_parent] => NULL
)
[2] => Array
(
[id] => 4
[name] => About Child
[id_parent] => 2
)
[3] => Array
(
[id] => 5
[name] => About Child's Child
[id_parent] => 4
)
)
Run Code Online (Sandbox Code Playgroud)
如何将子项嵌套到父数组中的数组中
Array
(
[1] => Array
(
[id] => 2
[name] => About
[id_parent] =>
[children] => Array
(
[id] => 4
[name] => About Child
[id_parent] => 2
[children] => …Run Code Online (Sandbox Code Playgroud) 我有两个divs ,第一个div位于相对位置,另一个div位于绝对位置,当我将浏览器大小调整为 100% 屏幕尺寸时,一切看起来都很好。
当我调整浏览器大小并且绝对位置的第二个元素出现在容器之外时,问题就出现了,虽然不多,但仍然处于外部的不同位置。
\n\n演示: http: //jsfiddle.net/1pde2gyc/
\n\n我的CSS代码:
\n\n#container_front {\n position:relative;\n width:40%;\n margin-left:auto;\n margin-right:auto;\n}\n\n#front_like {\n position:absolute;\n width:50px;\n height:50px;\n left:75%;\n bottom:-1%;\n}\nRun Code Online (Sandbox Code Playgroud)\n\n问题是front_like,这个 DIV 内部有一个图像,该图像或多或少显示在右侧和中间,当我将屏幕大小调整到 50 或 30% 时,图像会从名为 的容器中消失container_front。
我认为使用绝对和 % 总是保持在相同的位置,但我看到当调整大小移出时,是否存在解决此问题的解决方案?ir css计算位置并留在容器中的同一侧并且没有出去
\n\n谢谢\xc2\xb4s最诚挚的问候。
\n