无法在我的 asp 经典代码页中直接使用 media-queries(与 css)

Cant use media-queries (with the css) directly in my asp classic code page

我的媒体查询有问题。在我的网站上,我使用框架集来显示表单。此表单是在 asp(经典)文件中创建的,其中也包含其代码。

在我第一次尝试启动它时,我的 css 样式表有一个 link,但我发现它不起作用,因为它是 cross-server.

所以我将所有 css 样式直接放在 asp 代码页中,我的样式再次起作用。然而,缺点是我在以前的样式表中使用了@media 查询,但是由于某种原因,当我将 css 直接放在我的 asp 页面中时(打开和关闭)页面出现错误当包含@media 查询时。当我将它们排除在外时,它工作正常。

代码 + css + html 扩展名为 .asp 的文件。

<!--#include file="tools.asp"-->
<!--#include file="connectionMemo.asp"-->

<HTML>
    <HEAD>
        <style type=text/css>
            <% 
                ' Cannot link css file cross domain
            %>

                @media only screen and (min-width : 1224px)  {

                   .Some style here{ }
                 }


                 @media only screen and (min-width : 1801px)  {

                   .Some other style here{ }
                 }

            </style> 
<TITLE>Ticket aanmaken</TITLE>
    </HEAD>
    <BODY bgcolor="#C0D1E5">
    <h2 align="left"><font face="Verdana, Arial" color="#000080">Ticket aanmaken</font></h2>

~ASP, javascript and html code here for the functionality (to much to all copy paste).

</body>
    </html>

~Some more asp code here

在我的第一次尝试中,我包含了 css 样式表,就像工具和连接文件一样,这没有用,原因很明显(没有 asp 文件,不在 header, 等等)然后我只是 link 编辑 css 带有 href link 的样式表,但是因为文件是跨域的,所以这也不起作用。

上面的代码是我最后一次尝试,我只是将样式表直接粘贴到代码/功能页面 - asp 文件中(所以我没有遇到跨域问题)。

虽然这也不起作用,但似乎是媒体查询导致了问题。当我删除媒体查询时, css 被加载,当我仅删除顶级媒体查询时, css 也被加载(可能是因为它加载了它遇到的第一个 css 并且它可以加载)。

有人知道如何解决这个问题吗?

尽量使用双@@符号。这将转义@符号并在客户端正确呈现@media