gpt4 book ai didi

c# - 如何在我的 ASPX 页面上引用 CSS 文件?

转载 作者:行者123 更新时间:2023-11-28 12:48:52 25 4
gpt4 key购买 nike

我在我的页面中添加了以下内容:

<head id="Head1" runat="server">
<link href="Content/Site.css" rel="stylesheet"/>
<title></title>
</head>

这就是 .CSS 文件的样子:

.form {
background-color: #b0e0e6;
margin-left: auto;
margin-right: auto;
width: 70%;
}

<body>
<form runat="server" class="form">
..
....

</body>

但是,当我在 IE 中查看该页面时,没有任何变化。

我做错了什么?

最佳答案

首先把它改成<link href="Content/Site.css" rel="stylesheet" type="text/css"/> .

另外,确保样式表的路径是正确的。

确保文件顶部有 DOCTYPE 声明。

关于c# - 如何在我的 ASPX 页面上引用 CSS 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17154097/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com