将CSS样式表添加到app_offline [英] Add css style sheet to app_offline

查看:81
本文介绍了将CSS样式表添加到app_offline的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我正在尝试制作自定义app_offline.htm,并想在项目中添加指向我的CSS文件的链接.但是下一个代码不起作用

Well, I'm trying to make custom app_offline.htm and want to add links to my css files in project. But next code doesn't work

<link href="/Content/Themes/screen.css" rel="stylesheet" type="text/css" />

在控制台中我出现了错误

In console I've got error

获取mySite/Content/Themes/screen.css 503(服务不可用)

GET mySite/Content/Themes/screen.css 503 (Service Unavailable)

请给我建议如何链接到app_ofline.htm中的CSS文件.任何帮助将不胜感激!

Please, give me advise how to make a link to css file in app_ofline.htm. Any help will greatly appriciated!

推荐答案

app_offline.htm的想法是,它表明该应用程序处于脱机状态.因此,当站点处于脱机状态时,该站点没有可用的资源.将相关规则放入页面中,或将样式表托管在单独的域中.

The idea of the app_offline.htm is that it indicates that the app is, well, offline. So, no resources are available from the site when the site is offline. Either put the relevant rules into the page or host the stylesheet on a separate domain.

这篇关于将CSS样式表添加到app_offline的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆