gpt4 book ai didi

bootstrap-4 - Bootstrap Navbar 在不同的浏览器中表现不同

转载 作者:行者123 更新时间:2023-12-04 04:09:17 24 4
gpt4 key购买 nike

在我的申请中Bootstrap navbar在 Chrome 中未按预期运行,但在 Firefox 中按预期正常显示。请帮我解决这个问题。

代码:

<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">

<head>

<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
crossorigin="anonymous">

</head>


<body>

<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarTogglerDemo02"
aria-controls="navbarTogglerDemo02" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active"><a class="nav-link" href="#">Home
<span class="sr-only">(current)</span>
</a></li>
<li class="nav-item"><a class="nav-link" href="#">Projects</a></li>
<li class="nav-item"><a class="nav-link" href="#">Employees</a></li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search"
placeholder="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>

<div>
<h4 class='text-center'>Current Projects</h4>
<table>

<thead>
<tr>
<th>Project Name</th>
<th>Project Stage</th>
<th>Description</th>

</tr>

</thead>
<tbody>
<tr th:each="aProject : ${projectsList}">

<td th:text="${aProject.name}"></td>
<td th:text="${aProject.stage}"></td>
<td th:text="${aProject.description}"></td>

</tr>

</tbody>

</table>

<h4 class='text-center'>Employee Details</h4>

<table>

<thead>
<tr>
<th scope="col">Employee Name</th>
<th scope="col">Employee Email Address</th>
</tr>

</thead>
<tbody>
<tr th:each="anEmployee : ${employeesList}">

<td th:text="${anEmployee.firstName} + ${anEmployee.lastName}"></td>
<td th:text="${anEmployee.email}"></td>
</tr>

</tbody>

</table>

</div>

</body>

Chrome:

Chrome

火狐:

Firefox

最佳答案

重新安装 chrome 可能会有帮助。请尝试让我知道。

关于bootstrap-4 - Bootstrap Navbar 在不同的浏览器中表现不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62023862/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com