Bootstrap 4:
<nav id="ID1" class="navbar navbar-expand-* fixed-top">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">...</a>
<div class="dropdown-menu">
<a href="#ID2" class="dropdown-item">...</a>
</div>
</li>
</ul>
</nav>
<nav id="ID1" class="navbar navbar-expand-* fixed-top">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">...</a>
<div class="dropdown-menu">
<a href="#ID2" class="dropdown-item">...</a>
</div>
</li>
</ul>
</nav>
2021-01-05
Bootstrap 4:
<a href="#ID" class="carousel-control-prev" data-slide="prev">
<span class="carousel-control-prev-icon"></span>
</a>
<a href="#ID" class="carousel-control-next" data-slide="next">
<span class="carousel-control-next-icon"></span>
</a>
<a href="#ID" class="carousel-control-prev" data-slide="prev">
<span class="carousel-control-prev-icon"></span>
</a>
<a href="#ID" class="carousel-control-next" data-slide="next">
<span class="carousel-control-next-icon"></span>
</a>
2021-01-04
Bootstrap 4:
<div class="carousel-inner">
<div class="carousel-item active">
<img src="..." />
<div class="carousel-caption">...</div>
</div>
<div class="carousel-item">
<img src="..." />
<div class="carousel-caption">...</div>
</div>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="..." />
<div class="carousel-caption">...</div>
</div>
<div class="carousel-item">
<img src="..." />
<div class="carousel-caption">...</div>
</div>
</div>
2021-01-04
Bootstrap 4:
<div id="ID1" class="accordion">
<div class="card">
<div class="card-header">
<a href="#ID2" class="card-link" data-toggle="collapse">...</a>
</div>
<div id="ID2" class="collapse" data-parent="#ID1">
<div class="card-body">...</div>
</div>
</div>
</div>
<div id="ID1" class="accordion">
<div class="card">
<div class="card-header">
<a href="#ID2" class="card-link" data-toggle="collapse">...</a>
</div>
<div id="ID2" class="collapse" data-parent="#ID1">
<div class="card-body">...</div>
</div>
</div>
</div>
2021-01-04
Bootstrap 4:
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn">
<input type="radio或checkbox" />
…
</label>
<label class="btn">
<input type="radio或checkbox" />
…
</label>
</div>
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn">
<input type="radio或checkbox" />
…
</label>
<label class="btn">
<input type="radio或checkbox" />
…
</label>
</div>
2021-01-03
$("#mybutton").click(function(){
$(this).button("loading").delay(1000).queue(function(){
$(this).button("toggle").button("reset").dequeue();
});
});
$(this).button("loading").delay(1000).queue(function(){
$(this).button("toggle").button("reset").dequeue();
});
});
2021-01-03
Bootstrap 4:
<div class="alert alert-dismissible">
<button class="close" data-dismiss="alert">×</button>
</div>
<div class="alert alert-dismissible">
<button class="close" data-dismiss="alert">×</button>
</div>
2021-01-01
Bootstrap 4:
<div class="alert alert-dismissible">
<button class="close" data-dismiss="alert">×</button>
</div>
<div class="alert alert-dismissible">
<button class="close" data-dismiss="alert">×</button>
</div>
2021-01-01
Bootstrap 4:
<div class="dropdown">
<button class="dropdown-toggle btn" data-toggle="dropdown">...</button>
<div class="dropdown-menu">
<a href="..." class="dropdown-item">...</a>
<a href="..." class="dropdown-item">...</a>
</div>
</div>
<div class="dropdown">
<button class="dropdown-toggle btn" data-toggle="dropdown">...</button>
<div class="dropdown-menu">
<a href="..." class="dropdown-item">...</a>
<a href="..." class="dropdown-item">...</a>
</div>
</div>
2021-01-01
<script src="http://cdn.bootcss.com/bootstrap/3.3.1/js/bootstrap-popover.js"></script>
引入代码
引入代码
2020-05-02
该课的例子是错误的,不管有没有toggle都会连触发而不会隐藏,主要是元素选择的不对:应该选择里面的要显示的ul元素,同时失去主焦点时,隐藏此ul元素
$(function(){
$('#course').on('click',function(){
$('#course-menu').toggle();
}).focusout(function(){
$('#course-menu').hide();
});
});
$(function(){
$('#course').on('click',function(){
$('#course-menu').toggle();
}).focusout(function(){
$('#course-menu').hide();
});
});
2020-01-23
监控器监控的内容,一定要处于scrollspy状态.
这里还有一个要匹配的问题,即监控的内容要处于scrollspy状态.
比如你要监控的是body, 那body一定处于scrollspy状态.
如果你要监控的一个div,那div一定要处于scrollspy状态.
不然的话监控是没有效果的.
比如:
你监控div,但是div的内容不处于scrollspy, 这时body处于scrollspy是没有用的.
这里还有一个要匹配的问题,即监控的内容要处于scrollspy状态.
比如你要监控的是body, 那body一定处于scrollspy状态.
如果你要监控的一个div,那div一定要处于scrollspy状态.
不然的话监控是没有效果的.
比如:
你监控div,但是div的内容不处于scrollspy, 这时body处于scrollspy是没有用的.
2019-10-06