【问题标题】:noscript tag appears even if javascript is turned on in IE8即使在 IE8 中打开了 javascript,也会出现 noscript 标记
【发布时间】:2010-05-26 10:46:10
【问题描述】:

ghost noscript 标签more info here
我正面临这个问题,我该如何处理 Internet Explorer 浏览器:-(?

说明:
我在我的应用程序布局中包含了以下 noscript 标记

<noscript style="background:#ffcc00;font-size:200%;font-family:verdana;text-align:center;text-transform:uppercase;font-weight:bold;padding:0.8em;">javascript is disabled, please enable it first.</noscript>

现在,当我在 IE8 中查看此布局时,noscript 标签 CSS 显示在页面顶部,其中没有内容,使布局看起来有问题。

请帮忙...

【问题讨论】:

    标签: css internet-explorer-8 ie8-compatibility-mode noscript


    【解决方案1】:

    不要为 noscript 标签设置样式,将内容放在另一个标签中:

    <style>
    #js-warning p {
        background:#ffcc00;
        font-size:200%;
        font-family:verdana;
        text-align:center;
        text-transform:uppercase;
        font-weight:bold;
        padding:0.8em;
    }
    </style>
    
    <noscript id="js-warning">
    <p>Javascript is disabled, please enable it first.</p>
    </noscript>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-01
      • 1970-01-01
      • 2014-06-11
      • 2021-08-25
      • 1970-01-01
      • 2016-03-17
      • 1970-01-01
      相关资源
      最近更新 更多