[英]Html and Css that I created outside ASP.NET doesn't fit when I add it in ASP.NET CORE Razor
I created the html and css for My Profile page and when I added that html and css in ASP.NET CORE it looks different. I created the html and css for My Profile page and when I added that html and css in ASP.NET CORE it looks different.
This is how it looks when I open it from index.html这是我从 index.html 打开它时的样子
And when I added it in ASP cshtml along with styles.css当我将它与 styles.css 一起添加到 ASP cshtml 中时
Some differences in cshtml: cshtml的一些区别:
What can be the reason for this?这可能是什么原因?
The problem is that I had an reference to an different bootstrap version library in the layout file.问题是我在布局文件中引用了不同的引导版本库。
This one: <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous" />
这个:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous" />
and the version of bootstrap I used for my html was 5.0.0, so I just removed the reference to bootstrap in layout and I added the new one: <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
我用于 html 的引导程序版本是 5.0.0,所以我只是删除了布局中对引导程序的引用并添加了新的:
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
It's working now.它现在正在工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.