模态窗口不工作,看不懂原因,控制台没有报错,我都是按照官方文档做的。
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Форма администратора">
<title>Учет техники | Администратор</title>
<!-- Bootstrap стили CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<!-- Иконки стили CSS -->
<link href="css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<script src="js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
替换
data-toggle="modal"
-->data-bs-toggle="modal"
data-target="#exampleModal"
-->data-bs-target="#exampleModal"
data-dismiss="modal"
-->data-bs-dismiss="modal"
例子