noscript tag isn't working on internet explorer

前端 未结 3 803
不知归路
不知归路 2021-01-24 21:54

I have a website with the

3条回答
  •  死守一世寂寞
    2021-01-24 22:34

    Encountered this issue as well. I had this working in IE and then it stopped all of a sudden. What I found is that if your css is nested beneath a noscript tag in your actual css definition it will not work. If you use just a class name its fine.

    I'm using IE 10 to test with and their dev tools to change the document mode to older browser modes to verify. Results may vary when actually using older browsers. Report back if this is the case.

    Example html:

    
    

    Doesn't Work:

    // classes nested beneath a noscript tag are not applied by IE
    noscript div.noscript {
            display: block;
            text-align: center;
            color: white;
            font-weight: 700;
            background: #D53333;
            margin: 0 auto;
            padding: 4px;
        }
    

    Does work:

    div.noscript {
        display: block;
        text-align: center;
        color: white;
        font-weight: 700;
        background: #D53333;
        margin: 0 auto;
        padding: 4px;
    }
    

提交回复
热议问题