admin管理员组文章数量:1387360
We are using .NET 8 and want to use CSS isolation.
In my program.cs
file, I have this code:
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.UseStaticWebAssets();
// .....
app.UseStaticFiles();
// ...
I then create a local .css
file associated to a page and then in the head section of app.razor
I place:
<link rel="stylesheet" href="_content/[MyAssemblyName].styles.css" />
Through explorer I can see that within the solutions
obj\Debug\net8.0\scopedcss\projectbundle
there is a file
[MyAssemblyName].bundle.scp.css
When I run my project, and look at the dev tools, I see a 404 error relating to my file. Opening the file I can see my isolated .css
.
本文标签: cIssue using CSS Isolation in Blazor ServerStack Overflow
版权声明:本文标题:c# - Issue using CSS Isolation in Blazor Server - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744512504a2609964.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论