发布后CSS不起作用 [英] css not work after publish

查看:99
本文介绍了发布后CSS不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IIS中发布我的网站后,我遇到了CSS问题. CSS无效或图像也未显示在网页中.

我正在使用Windows 7和IIS7.

所以,请帮帮我..

问候...
Mitesh

i hava a problem of css after the publish my website in IIS. the css not work or images also not displayed in the webpage.

i am using Windows 7 with IIS 7.

so,please help me..

Regards...
Mitesh

推荐答案

发布后,css不起作用或图像也未显示在网页中.
这是发布期间面临的常见问题.原因是定义CSS文件或图像的路径.发布后,为项目形成的相对路径不正确.
由于路径不正确,因此应用程序无法找到它们,因此不会加载任何图像或未应用任何CSS.您需要先解析URL,然后再将其引用为源.

本技巧将帮助您:解析多文件夹网站中的路径 [ ^ ]
the css not work or images also not displayed in the webpage after publish.
This is a common issue faced during publishing. Reason is the way path for CSS file or images defined. After publishing the relative path formed for the items are incorrect.
Since the path is incorrect, application fail to find them and thus no images load or any CSS applied. You need to resolve your URL before referring it as a source.

This tip would help: Resolving Paths in a Multi-Folder WebSite[^]


如果您已部署文件,则意味着它们的路径不正确-在针对Cassini Web引擎进行开发时,很容易发生这种情况,并且部署到生产服务器.通常发生这种情况是因为您使用的是文件的相对路径,并且设置相对路径的方式在两种环境之间是不同的.
If you''ve deployed the files, it means that the path you have to them is incorrect - which can easily happen when you are developing against the Cassini web engine, and deploying to a production server. It typically occurs because you are using relative paths to the files, and the way you are setting the relative path up is different between the two environments.


这篇关于发布后CSS不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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