how to call browser based css?

后端 未结 8 1362
粉色の甜心
粉色の甜心 2020-12-04 01:48

we can get the browser name from javascript but is there any way to change css accordingly.I mean some classes of css file because I dont want to link another css file , I

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 02:31

    Maybe something like

    body.chrome a img
    {
    margin:0;
    }
    
    body.mozilla a img
    {
    margin:5px;
    }
    

    then use Javascript to set a class on the body as required.

提交回复
热议问题