jQuery check if browser support position: fixed

后端 未结 7 623
灰色年华
灰色年华 2021-01-04 09:13

How do I check if browser supports position:fixed using jQuery. I assume I have to use $.support I think, but how?

Thank you for your time.

7条回答
  •  迷失自我
    2021-01-04 10:03

    You could check if position exists by making a code like this:

    
    
    
    
    

    Hi

    Since position exists in all main browser this will always return true. I imagine there isn't a way to check the possible values of position, so you'll have to check which browser and which version the user are viewing your page as Paolo Bergantino said.

提交回复
热议问题