HTML不会链接到Visual Studio代码中的CSS文件
问题描述:
我试图将我的css格式链接到一个HTML文档。
I am trying to link my css formatting to an HTML document.
正如你所看到的,我的CSS是链接是
As you can see, my CSS is link is
<link rel="stylesheet" href="css/style.css" />
我的CSS文件名为style.css,名为css。
为什么没有链接?
And my CSS file is titled style.css in a folder called css. Why is it not linking?
答
我会添加属性类型和值text / css
您的链接标签最终会如下所示:
I would add the attribute type and value "text/css" Your link tag would end up like this:
<link rel="stylesheet" href="css/style.css" type="text/css"