css - 如何将自定义 css 添加到 Sitecore Habitat 中自定义创建的特征模型的视图中?
问题描述
我正在尝试将自定义 css 添加到我的剃刀视图中。该路线正在工作,因为我可以看到文件中的 html,但是当我尝试添加自定义 css 时它不起作用。
我已经在我的 Overview.cshtml 中尝试了以下代码,这是我在 sitecore 中的自定义功能的视图:
<head>
<meta name="viewport" content="width=device-width" />
<title>Overview Rules</title>
<link href="~/Style/ExternalProfiling.css" rel="stylesheet" />
@RenderAssetsService.Current.RenderStyles()
</head>
两者都是栖息地解决方案中的选项,但似乎都不起作用。我的文件结构如下:
实际结果是没有样式表链接到 cshtml 文件,因为我认为它已被覆盖。我想知道我应该将我的 css 或 sass 放在哪里,以便在功能模型中自定义创建的视图上进行样式设置。
解决方案
推荐阅读
- mysql - 如何从要插入新表的一列中获取结果并将结果分开
- xcode - 将 Fabric onboarding 从 Xcode 切换到 CocoaPods(*.xcodeproj 到 *.xcworkspace)
- android - 无法将 Kotlin-kapt 与 kotlin/native 一起使用
- css - 当我需要不同的宽度时,如何处理 CSS 网格中的动态列数?
- sql - 为什么 SQL Server 死锁牺牲品错误 (1205) 会结束其所有事务?
- silverstripe - silverstripe 4 可翻译模块
- python - objectpath json查询以在python中获取数组值
- javascript - 添加 if 语句后,我的“提示”不会加载到网页上
- svg - 与 SVG 元素的样式和鼠标交互
- c++ - 如何使 Git 提交哈希在 C++ 代码中可用而无需重新编译?