1、安装
npm install holderjs
2、引入文件
<script src="holder.js"></script>
3、例子
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="bs/css/bootstrap.css">
<script src="bs/js/jquery-3.6.1.js"></script>
<script src="bs/js/bootstrap.js"></script>
<script src="bs/js/holder.js"></script>
<title>bootstrap</title>
<style>
</style>
</head>
<body>
<div class="container">
<h1 class="page-header">bootstrap前端框架</h1>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus
sagittis lacus vel augue laoreet rutrum faucibus." title="title">
Popover on 底部
</button>
<br/>
<br/>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content="
可消失的弹框" title="title" data-trigger="focus">可消失的弹框</button>
</div>
</body>
<script>
$(function () {
$('[data-toggle="popover"]').popover()
});
</script>
</html>