将内联样式分成多行会影响到什么吗?

时间:2021-05-24 21:37:19

let's say I have a very long line of inline styling, for example:

假设我有一长串内联样式,例如:

<input type="radio" style="visibility: hidden; position: absolute; foo: bar; baz: foo; etcetera: etc; and: more;">

and then I decide to make it more readable like this:

然后我决定让它更像这样:

<input type="radio" style="visibility: hidden; position: absolute;
    foo: bar; baz: foo; etcetera: etc; and: more;">

Does this affect the functionality or is it okay to break it into multiple lines like this?

这是否会影响功能,还是可以将其分成多行?

1 个解决方案

#1


6  

It's fine. White space doesn't affect the browsers interpretation of that CSS or rendering of that element.

没关系。空格不会影响该CSS的浏览器解释或该元素的呈现。

#1


6  

It's fine. White space doesn't affect the browsers interpretation of that CSS or rendering of that element.

没关系。空格不会影响该CSS的浏览器解释或该元素的呈现。