链接到外部CSS文件。 [英] link to the external CSS file.

查看:89
本文介绍了链接到外部CSS文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个CSS文件,想要链接到ascx文件。如何将CSS文件嵌入到ascx文件中...

感谢

I have a CSS file and would like to be link to the ascx file. How do I embed the CSS file to the ascx file ...

Thanks

推荐答案

嗨Slen,

如果您的CSS文件位于站点的根目录中,那么您可以在控制标记之后直接在ascx控件中添加CSS文件。或者在调用控件的目标页面中。如果文件不在根目录中,则需要提供相对路径。但最佳做法是添加目标路径。 Like-
< link href =" StyleSheet.css"的rel ="样式表"类型= QUOT;文本/ CSS" />
问候
AnupDG
Hi Slen,

If your CSS file in the root of the site then you can add the CSS file in the ascx control directly after the control tag. Or in the destination page where your your control is called. If the file is not in the root then you need to give the relative path. But the best practice is to add in the destination path. Like-
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />


regards
AnupDG


这篇关于链接到外部CSS文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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