当我说内联时,我的意思是在样式属性中放置 CSS 属性。
有没有办法用 Javascript 确定一个特定的属性是否不能内联?
Css properties can all be used,
but you cannot use pseudoclasses and pseudoelements like :hover
, :after
:nth-child()
etc.
I can't think of any (standard) CSS that can't be written inline, but you couldn't declare a class or pseudoclass inline for instance.
Inline is a valid place to define CSS, so any CSS will work there else the precedence of CSS (C=cascading) would be broken.