为什么Bootstrap面板在Blazor客户端中不起作用?

时间:2019-12-05 11:53:32

标签: razor .net-core blazor

我编译以下代码以获取引导面板,但未成功

enter image description here

@page "/test"
<h3>test</h3>

<div class="panel panel-primary">
    <div class="panel-heading">Panel with panel-primary class</div>
    <div class="panel-body">Panel Content</div>
</div>

@code {

}

项目设置为 enter image description here

bootstrap.main.cs是

enter image description here

wwwroot文件夹看起来像这样

enter image description here

Index.html

enter image description here

2 个答案:

答案 0 :(得分:1)

Blazor使用Bootstrap 4,.panel的{​​{1}} was replaced

因此基本版本变为:

.card

答案 1 :(得分:-1)

添加到Index.html标题部分

<link href="Bootstrap/bootstrap.mini.css" rel="stylesheet" />