<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap 示例</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://www.w3schools.cn/lib/bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet">
<script src="https://www.w3schools.cn/lib/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="img_avatar1.png" alt="Logo" style="width:40px;" class="rounded-pill">
</a>
</div>
</nav>
<div class="container-fluid mt-3">
<h3>品牌/Logo</h3>
<p>当使用带有图像的 .navbar-brand 类时,Bootstrap 5 会自动设置图像样式以适应导航栏。</p>
</div>
</body>
</html>