为什么我的浏览器无法显示我的Semantic UI CSS表单

问题描述 投票:0回答:1

我正在创建一个表单并在我的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正在运行。我感到很困惑

semantic-ui
1个回答
1
投票

尝试使用以下代码段

<link
  rel="stylesheet"
  type="text/css"
  href="http://localhost:3000/dist/semantic.min.css"
/>

看来你试图用text/html包含样式表

© www.soinside.com 2019 - 2024. All rights reserved.