semantic-ui - 为什么我的浏览器无法显示我的语义 UI CSS 表单
问题描述
我正在创建一个表单并在我的 localhost 上使用 3000 端口提供它。
一切正常,除了我的浏览器无法在我的浏览器中显示 CSS 代码并且我收到此错误
Refused to apply style from 'http://localhost:3000/Semantic-UI-master/dist/semantic.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
发生了什么?当我单击 html 文件时,CSS 正在工作。我感到很困惑
解决方案
尝试使用以下代码段
<link
rel="stylesheet"
type="text/css"
href="http://localhost:3000/dist/semantic.min.css"
/>
您似乎试图将样式表包含在text/html
推荐阅读
- oracle - 错误“Oracle 主目录包含无效字符”
- qt - 模块“QtQuick.XmlListModel”没有安装?
- javascript - 在 pwa 中禁用右键单击图像
- apache-spark - 我可以像推送 spark 指标一样将 spark 应用配置推送到 prometheus 吗?
- python - 如何在 h5py 中为不同的数据集设置不同的缓存大小?
- python - Python 挑剔的 ListIndexOut of Range
- python - 将两个 python 列表组合成一个笛卡尔积
- rust - 如何使用 Rust 的`catch_unwind` 获取恐慌信息(尤其是堆栈跟踪)?
- javascript - 如何在使用 MCR 架构的 nodejs 中实现 Socket.io
- javascript - 我面临两个问题。此代码应该打印“待办事项”列表