How does js determine whether the browser supports gradient colors?

problem description

background images use-webkit-gradient to achieve gradient. Wechat browsers on iPhone and PC do not support

the environmental background of the problems and what methods you have tried

cannot find this value in document.documentElement.style
currently judge not to use gradient color in iPhone

related codes

/ / Please paste the code text below (do not replace the code with pictures)
background-image:-webkit-gradient (linear, 00,0 bottom, from-sharpf3d395)

what result do you expect? What is the error message actually seen?

what method does js have to judge whether gradient colors are supported or not, so as to do some processing

May.22,2021

the gradient should be supported. Try putting the standard one at the bottom

.
  Modernizr.js , support detection  CSS Gradients  

Menu