如何在ASP.NET的多个网站中使用一个CSS文件? [英] how to use one CSS file in multiple websites in ASP.NET?

查看:92
本文介绍了如何在ASP.NET的多个网站中使用一个CSS文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web项目,我已经实现了另一个Web用户控制项目.我正在将.ascx文件用于第一个Web项目,并希望将第一个Web项目CSS类应用于该.ascx文件,但是隐式地.所以我可以将此方案用于其他Web项目.
有什么方法可以创建CSS文件并自动调用它?

I have a one web project, i have implement another web user control project. I am using .ascx file into first web project and want to apply first web project CSS classes to that .ascx file, but implicitely.so i can use this scenario for different web project.
Is there any way to create CSS file and call it automatically ?

推荐答案

您在说什么方案"?很难理解您真正想要什么(请参阅我对问题的评论),因此我不太确定您自己理解了什么,但是在不同站点中使用相同的CSS并不简单,这是任何外部实体的最基本用法.

请参见:
http://en.wikipedia.org/wiki/CSS [
What "scenario" are you talking about? It''s very hard to understand what do you really want (please see my comment to the question), so I''m not quite sure you understand it by yourself, but using the same CSS in different sites is not just trivial, this is the very basic usage of any external entities.

Please see this:
http://en.wikipedia.org/wiki/CSS[^].

You could read:

CSS files can be associated with HTML documents using the following syntax:
<link rel="stylesheet" href="http://example.com/css/style.css" type="text/css" />



在这里使用外部样式表.而且样式表是外部的,如果这是相同的站点,有什么区别? URL是URL,不是吗? :-)

—SA



This is where you use external style sheets. And it a style sheet is external, what''s the difference if this is the same site or not? URL is URL, isn''t it? :-)

—SA


这篇关于如何在ASP.NET的多个网站中使用一个CSS文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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