javascript - Setting inline css transition style with string alters the true value. Bizarre -
I have a stylesheet that sets up a CSS transition property such as (prefix versions for short): Infection: Opacity 1s; Then I have several elements on the page, and I want to modify the transition-delay property of each element through javascript, giving a conflict effect for . I am using jQuery like this: $ (element). Css ('transition-delay', delay + 's'); However, the above code adds an inline transit-delay: x to the No element, instead, the result is: / P> & lt; Div style = "transition: xs;" & Gt; But that's okay, because it works as expected, the browser knows that transition: Xs actually means that just the code To process, set transition-delay and retain the rest. However: If I now meet the inline style of that element through the $ (element) .attr ('style') , and After that it is re-applied to the element, $ (element) .attr ('style', style) , HTML exactly looks identical, but the tran...