gpt4 book ai didi

c# - 我如何加载我的 ASHX CSS 处理程序?

转载 作者:太空宇宙 更新时间:2023-11-03 22:08:15 24 4
gpt4 key购买 nike

我想将我的 css 代码解析为这个条件 css 解析(我希望我说的是正确的) http://www.conditional-css.com/usage

说明说我必须将 c-css.ashx 文件粘贴到 CSS 所在的文件夹中。

接下来我必须在我的模板主文件中添加一个@import 行???

下面是说明,你能帮帮我吗?

ASHX handler

The C# ASHX version of Conditional-CSS is perfect if you wish to try out Conditional-CSS in a .Net environment, or only have a couple of CSS files on your site. To install:

  1. Place the downloaded file (c-css.ashx) on your server in the same location as your CSS files.

  2. Load the 'c-css.ashx' file you uploaded in your web-browser and admire the parsed CSS.

  3. Include the 'c-css.ashx' file as you would any CSS file on your web-pages using: @import "{path_to_}/c-css.ashx"; (or similar).

最佳答案

在你的<head> html 页面的一部分,@import 是这样完成的:

<style type="text/css" media="screen">
@import "/pathtocss/c-css.ashx";
</style>

您没有理由不能使用 <link> 来做到这一点要么:

<link rel="stylesheet" type="text/css" href="/pathtocss/c-css.ashx">

关于c# - 我如何加载我的 ASHX CSS 处理程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7646645/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com