当我使用Bower安装类似的东西时bootstrap-sass-official,它会将它安装在bower_components目录中.像Bootstrap这样的组件允许通过编辑文件进行自定义bower_components/assets/stylesheets/_bootstrap.scss.在这种情况下,您可以简单地选择要用于项目的Bootstrap的哪些部分.
众所周知,这是最有效和最佳实践离开包和部件,如./bower_components,./vendor,./node_modules等了源代码控制的.但问题是,当其他人下载您的源并安装bower依赖项时,您的自定义设置永远不会安装.
因此,假设您遵循最佳实践并且bower_components不受源代码控制,那么自定义组件(如Bootstrap)的最佳位置在哪里?只需复制_bootstrap.scss到源控制目录并在那里进行自定义?还是有更优雅的方法?
默认引导程序轮播控件(左箭头和右箭头)具有跨越轮播中图像高度 100% 的链接。我很抱歉,因为这可能是一个愚蠢的问题,但是如何更改它以使链接仅超过箭头本身的宽度和高度?
您可以在 Boostrap 文档( https://getbootstrap.com/docs/3.3/javascript/#carousel )上的“Carousel”下查看我的意思的示例,并且轮播的代码如下。
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="..." alt="...">
<div class="carousel-caption">
...
</div>
</div>
<div class="item">
<img src="..." alt="...">
<div class="carousel-caption">
...
</div>
</div>
...
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" …Run Code Online (Sandbox Code Playgroud) 我正在查看html元素的字体大小,它说:10px。它声称它来自引导程序(v3)。
果然,在 bootstrap.css 中,我看到了以下内容:
html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
Run Code Online (Sandbox Code Playgroud)
从我读过的内容来看,默认大小应该是 14px。我问的原因是我已经开始使用rem单位并且所有东西看起来都非常小,因为基本字体很小。
我错过了什么?