我的bootstrap问题。在navbar-brand。
我想创建这个:
我有这段代码:
<!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">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/papai.pl.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<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 class="navbar-brand"><input type="text" class="form-control" id="inputHorizontalSuccess" placeholder="Photos, people or groups"></div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right line-inline">
<button type="button" class="btn btn-link" id="signin-btn">Sign In</button>
<button type="button" class="btn btn-default" id="signin-btn">Sign In</button>
</ul>
</div>
</div>
</nav>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
我在没有结果的情况下搜索了一半的互联网,表单搜索总是存在问题。
答案 0 :(得分:0)
您的问题不明确,所以只是为了澄清,您似乎想要创建一个类似于您在自己网站上链接的导航栏,因此您将该网站的HTML复制到您的网站中。但是,HTML还不够,你还需要CSS和Javascript才能使它看起来一样。
虽然你可以复制所有的CSS和JS文件,但你最终会得到大量的冗余代码,而你却不知道它是如何工作的。我建议您保留HTML,并尝试自己编写其余部分。这很难,但你会学到很多东西。