how to call browser based css?

后端 未结 8 1383
粉色の甜心
粉色の甜心 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:38

    There are two ways:

    Client side: you need to use Javascript to detect the browser and import the appropriate CSS style. Have a look at this article. (link no longer available)

    Server side: you need to detect the user agent and serve the appropriate HTML. Here's a PHP source link for this.

提交回复
热议问题