Net Core MVC - 更改字体大小

时间:2018-03-18 00:35:14

标签: c# html css asp.net-core-mvc

我创建了一个带自动脚手架的MVC核心应用程序 我正在尝试更改我的HTML视图的字体大小 我该如何改变字体大小?在bootstrap.css?而且我看到很多字体大小,不知道在哪里寻找。我没有在bootstrap.css

中找到类“form-actions”
<p>
    <a asp-action="Create">Create New</a> </p>

<form asp-action="Index" method="get">
    <div class="form-actions no-color">
        <p>
            <b>Find by Brand:</b> <input type="text" name="ParamBrand" value="@ViewData["currentBrand"]" />
            <br />
            <b>Find by Color:</b> <input type="text" name="ParamColor" value="@ViewData["currentColor"]" />
            <br />
            <b>Find by Weight:</b> <input type="text" name="ParamWeight" value="@ViewData["currentWeight"]" />
            <input type="submit" value="Search" class="btn btn-default" /> |
            <a asp-action="Index">Back to Full List</a>
        </p>
    </div>

1 个答案:

答案 0 :(得分:0)

看看你的_layout.cshtml。在那里你会看到,哪个css文件以哪种顺序加载。

你会看到这样的事情:

<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" />

这意味着,在bootstrap之后加载了site.css。您可以将任何覆盖放入site.css,它将覆盖您的引导规则:

.no-color {
   font-size: 48px;
}