报错:
GET http://127.0.0.1:5000/css/bootstrap.min.css 404 (NOT FOUND)
我的link写法
<link href="css/bootstrap.min.css" rel="stylesheet">
没有开服务器的时候页面是正常显示的,开了服务器它就在链接前面添加了http://127.0.0.1:5000/ 导致找不到
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
问题描述有问题,不明白什么是没有开服务器页面显示正常。
另外你的静态资源路径正确么,对于
<link href="css/bootstrap.min.css" rel="stylesheet">这种链接,自然是会映射到
http://127.0.0.1:5000/css/bootstrap.min.css上,如果是外部css的话,可以使用完整的url来引用