我正在使用新的Twitter Bootstrap 3,我试图在顶部导航栏中放置如下(如下)的搜索框:

在Bootstrap 2中,它可以像这样完成:
<form class="form-search" method="get" id="s" action="/">
<div class="input-append">
<input type="text" class="input-medium search-query" name="s" placeholder="Search" value="">
<button type="submit" class="add-on"><i class="icon-search"></i></button>
</div>
</form>
Run Code Online (Sandbox Code Playgroud)
但是我不知道如何在Bootstrap 3中生成相同的内容,因为已经发生了很大变化.
Bootstrap 3中导航栏搜索框表单的默认HTML是:
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
Run Code Online (Sandbox Code Playgroud)
如何修改它以实现我的需要?

Google Web Fonts上的某些字体支持多个"字符集".问题是,如果我使用的网络字体仅提供"拉丁"字形,那么将页面翻译为不支持字形的语言的用户将清楚地注意到混乱的文本.
我希望我的网络字体支持除英语之外的世界上最流行的语言,例如西班牙语,德语,法语等.
为了这个目的,我想知道,"拉丁语"和"拉丁语"的语言完全符合哪种语言.
我希望答案看起来像:
Latin Character Set & Supported Languages:
- ..........
- ..........
- ..........
Latin-Extended Character Set & Supported Languages:
- ..........
- ..........
- ..........
Run Code Online (Sandbox Code Playgroud)
我无法在Google Web Fonts文档或Google搜索中找到此信息.
编辑2:答案似乎都没有用.甚至不是我之前标记为这个问题的答案.任何帮助表示赞赏.谢谢.
首先,我搜索了一个关于创建"返回"链接的方法,该链接允许用户返回上一页,这有两种方法:
<a href="javascript:history.go(-1)">[Go Back]</a>
Run Code Online (Sandbox Code Playgroud)
和...
<a href="#" onclick="history.go(-1);return false;">[Go Back]</a>
Run Code Online (Sandbox Code Playgroud)
这两个中的哪一个是更好的选择?为什么?(另外,请介绍一下浏览器兼容性.)
这是问题的一半.现在,如果我的第一页是用户访问的,那么"返回"链接将不起作用,对吧?(因为窗口或标签没有预先存在的历史记录.)在这种情况下,我希望链接回退并将用户带到http://example.com.
即如果历史存在,则用户将被带到上一页,如果不存在,则将其带到http://example.com.
我怎么做?希望有人能提供帮助.
编辑:请注意我不懂JavaScript,所以请你的答案解释.谢谢.
现行代码:
<?php
// See the AND operator; How do I simplify/shorten this line?
if( $some_variable !== 'uk' && $some_variable !== 'in' ) {
// Do something
}
?>
Run Code Online (Sandbox Code Playgroud)
和:
<?php
// See the OR operator; How do I simplify/shorten this line?
if( $some_variable !== 'uk' || $some_variable !== 'in' ) {
// Do something else
}
?>
Run Code Online (Sandbox Code Playgroud)
是否有更简单(即更短)的方式来编写这两个条件?
注意:是的,它们是不同的,我期待缩短代码的不同方法.
我了解到Google会根据从中访问的浏览器/设备自动提供TTF,EOT,WOFF或SVG字体文件.
现在我计划从我的服务器本身托管和提供字体文件,为此我首先必须下载网络字体的所有文件格式.
我如何或在哪里下载我想使用的网络字体的4种文件格式?
PS:通过使用不同的浏览器 - Chrome,IE9和Safari(dev - iPhone UA),我能够获得WOFF,EOT和TTF格式.但是,SVG格式没有运气.如果有一种更简单的方法,它会很棒.
编辑:哦,顺便说一句,我知道我可以从fontsquirrel下载各种格式,但我说的是从这里的官方回购下载.
Twitter Bootstrap版本: 2.0.3
示例HTML代码:
<!DOCTYPE html>
<html dir="ltr" lang="en-US" xmlns:og="http://opengraphprotocol.org/schema/">
<head>
<link rel="stylesheet" type="text/css" media="all" href="reddlec/style.css" />
<script type="text/javascript">
$(document).ready(function() {
$('.carousel').each(function(){
$(this).carousel({
pause: true,
interval: false
});
});
});?
</script>
<script src="http://twitter.github.com/bootstrap/assets/js/jquery.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-carousel.js"></script>
</head>
<body>
<div id="myCarousel" class="carousel slide">
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">…</div>
<div class="item">…</div>
<div class="item">…</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
CSS:随bootstrap.css提供
问题:正如您所看到的,我已启用 …
例如,https://github.com/vanillaforums/Garden是GitHub存储库.但我只想https://github.com/vanillaforums/Garden/tree/master/plugins在存储库中"监视"此目录.
我怎么做?似乎没有办法.
关于使用schema.org标记实现面包屑的信息不多.到目前为止,我可以得到两份官方文件 - 一份显示:
<div itemscope itemtype="http://schema.org/Property" itemid="http://schema.org/breadcrumb">
<link itemprop="domain" href="http://schema.org/WebPage"/>
<link itemprop="range" href="http://schema.org/Text"/>
</div>
Run Code Online (Sandbox Code Playgroud)
而另一个显示这个:
<body itemscope itemtype="http://schema.org/WebPage">
<div itemprop="breadcrumb">
<a href="category/books.html">Books</a> >
<a href="category/books-literature.html">Literature & Fiction</a> >
<a href="category/books-classics">Classics</a>
</div>
</body>
Run Code Online (Sandbox Code Playgroud)
这两个加价完全不同.他们对你有意义吗?如果他们这样做,我如何用该标记包含以下简单面包屑代码 - 正确的方法?
<body>
<span id="breadcrumbs">
<a rel="home" href="http://example.com">
<span>Noob Archive</span>
</a> »
<span>
<a href="http://example.com/topic/html/">
<span>HTML</span>
</a> »
<strong>Best Practices: Markup for Setting up Breadcrumbs on Web Pages</strong>
</span>
</span>
</body>
Run Code Online (Sandbox Code Playgroud)
谢谢!
Twitter Bootstrap版本: 2.0.3
示例HTML代码:
<!DOCTYPE html>
<html dir="ltr" lang="en-US" xmlns:og="http://opengraphprotocol.org/schema/">
<head>
<link rel="stylesheet" type="text/css" media="all" href="reddlec/style.css" />
<script type="text/javascript">
$(document).ready(function() {
$('.carousel').each(function(){
$(this).carousel({
pause: true,
interval: false
});
});
});?
</script>
<script src="http://twitter.github.com/bootstrap/assets/js/jquery.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-carousel.js"></script>
</head>
<body>
<div id="carousel-1" class="carousel slide">
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">…</div>
<div class="item">…</div>
<div class="item">…</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
<div id="carousel-2" class="carousel slide">
<!-- Carousel items --> …Run Code Online (Sandbox Code Playgroud) html ×3
javascript ×3
webfonts ×2
breadcrumbs ×1
css ×1
directory ×1
dns ×1
fonts ×1
git ×1
github ×1
glyph ×1
html5 ×1
if-statement ×1
php ×1
repository ×1
schema.org ×1
xhtml ×1