【问题标题】:app_theme causes fonts not working asp.netapp_theme 导致字体无法正常工作 asp.net
【发布时间】:2018-02-13 08:26:02
【问题描述】:

我有定义 App_theme 的 asp.net webforms 项目。之后我更改了 .css 文件中的图像 url,但我的 fonts 不起作用。这是我定义的 App_theme:

我也在 web.config 文件中定义了它

  <system.web>
<pages theme="Default" masterPageFile="~/Site.master"/>

并在 index.aspx 中

<%@ Page Title="" Language="C#" Theme="Default" StyleSheetTheme="Default" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="MediLabV2._0.Index1" %>

我不明白问题出在哪里。请帮我解决这个问题。谢谢

【问题讨论】:

  • but my fonts are not working? 在此处显示一些其他详细信息。
  • 所有 .css 文件工作正常,但我有字体文件夹,其中一些我在我的网站中使用的字体在我的项目中制作 App_Themes 后无法正常工作

标签: c# asp.net fonts webforms app-themes


【解决方案1】:

某些代码无法正常工作,因为:

  1. 找不到目录或找不到文件路径。
  2. 与 .js 文件版本有些冲突。

Js 文件很可能是其他人之间的敏感文件。最好先检查一下或运行project &gt; right click your page &gt; inspect &gt; Console tab

冲突意味着您在项目with different version 中使用了多个.JS file

另一种选择是:

run your `project > right click your page > inspect > Console tab`

在您编辑项目时保持打开状态。编辑完成后。

right click你的页面和reload

记得打开你的inspect element always,它会在运行时更新你的项目。

如果你的css文件的目录是true and correct根据你的代码可以做到这一点。

你最后的选择:

App_Themes 有问题。

【讨论】:

  • 是的,console中关于字体的三个错误,但是我朋友的电脑上没有这些错误。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-05-01
  • 2015-12-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多