Define css if javascript is not enabled

前端 未结 8 1654
无人共我
无人共我 2020-12-10 14:58

I want to define .exampleclass img {height:250px} if javascript is not enabled. Is their anyway to undo this in javascript / jquery?

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 15:03

    put a "no-js" class on your body element, and then remove it with JS at load, and use .no-js in the selector for your CSS

提交回复
热议问题