我尝试了几种浏览器,并且在每种情况下网站都可以与 Live Server 正常工作。另一方面,当我使用 Firefox/Chrome 启动它时,网站根本不会加载我的 style.css,当我使用 Edge 时,我收到一条消息,指出文件丢失。这是我的 html 和 css 代码。
-----index.html-----
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/css/style.css" />
<link
rel="stylesheet"
href="/bootstrap/bootstrap-5.3.0-alpha1-dist/css/bootstrap.css"
/>
<link
rel="stylesheet"
href="/bootstrap/bootstrap-5.3.0-alpha1-dist/css/bootstrap.min.css"
/>
<title>Web Projekat</title>
</head>
<body>
<nav class="navbackgroundcolor navbar navbar-expand-lg navbar-dark">
<!-- Container wrapper -->
<div class="container-fluid">
<!-- Toggle button -->
<button
class="navbar-toggler"
type="button"
data-mdb-toggle="collapse"
data-mdb-target="#navbarCenteredExample"
aria-controls="navbarCenteredExample"
aria-expanded="false"
aria-label="Toggle navigation"
>
<i class="fas fa-bars"></i>
</button>
<!-- Collapsible wrapper -->
<div
class="collapse navbar-collapse justify-content-center"
id="navbarCenteredExample"
>
<!-- Left links -->
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item pe-5 fs-4">
<a class="nav-link" href="/html/gallery.html">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="index.html"
><img
class="skate"
src="/media/icons8-skateboard-64 white.png"
alt="Home"
/></a>
</li>
<li class="nav-item ps-5 fs-4">
<a class="nav-link" href="/html/shop.html">Shop</a>
</li>
</ul>
<!-- Left links -->
</div>
<!-- Collapsible wrapper -->
</div>
<!-- Container wrapper -->
</nav>
<script src="/bootstrap/bootstrap-5.3.0-alpha1-dist/js/bootstrap.js"></script>
<script src="/bootstrap/bootstrap-5.3.0-alpha1-dist/js/bootstrap.min.js"></script>
</body>
</html>
-----style.css-----
.skate {
height: 35px;
width: 35px;
}
.navbackgroundcolor {
background-color: #464648;
}
.navbar-link {
color: #c7c7c7 !important;
}
body {
background-size: cover;
background-color: #392727 !important;
}
我尝试过重命名文件,更改代码中行的位置,很少使用浏览器,很少有类似的帖子,制作不同的文件,但不知道还有什么效果,但没有任何效果。
Your Answer
1 个回答
Hot Questions
function_exists()无法判定自定义函数
2024-04-29 11:01:01
google 浏览器 手机版显示的怎么实现
2024-04-23 00:22:19
子窗口操作父窗口,输出没反应
2024-04-19 15:37:47
父窗口没有输出
2024-04-18 23:52:34
关于CSS思维导图的课件在哪?
2024-04-16 10:10:18
Hot Tools
vc9-vc14(32+64位)运行库合集(链接在下方)
phpStudy安装所需运行库集合下载
VC9 32位
VC9 32位 phpstudy集成安装环境运行库
php程序员工具箱完整版
程序员工具箱 v1.0 php集成环境
VC11 32位
VC11 32位 phpstudy集成安装环境运行库
SublimeText3汉化版
中文版,非常好用
热门话题
抖音等级价目表1-75
20335
7
20335
7
wifi显示无ip分配
13531
4
13531
4
虚拟手机号接收验证码
11850
4
11850
4
gmail邮箱登陆入口在哪里
8836
17
8836
17
windows安全中心怎么关闭
8420
7
8420
7
热门文章
2025年加密货币市场十大趋势预测:下一个风口在哪里?
2025-11-07
By DDD
币圈土狗项目如何识别?避免归零币的陷阱与风险预警
2025-11-07
By DDD
win10字体安装后在软件里找不到怎么办_win10字体安装与识别方法
2025-11-07
By DDD
Galaxy的观点:山寨币ETF大军即将到来 哪些的前景会光明
2025-11-08
By DDD
铁路12306支付失败订单还在吗_铁路12306支付失败订单处理方法
2025-11-07
By DDD





