使用的style属性皱眉了吗? [英] Is using the style attribute frowned upon?
问题描述
另请参阅:
在某些情况下,您肯定知道您要做的只是调整此特定元素的样式,其他。
在这些情况下,您可以愉快地使用内联样式属性。 但是,在未来的某个时候,您会意识到,实际上您需要将相同的样式应用于其他类型,并且您会发现自己错了。
在那里,完成了。 8 - )
As someone who is beginning to make a transition from table based design to full CSS I'm wondering if using the style attribute to make adjustments to elements is considered "cheating" and if absolutely ALL presentation should be strictly in the style sheet?
See also:
There are cases where you know for sure that all you want to do is tweak the style of this one specific element, and nothing else.
In those cases you can happily use an inline style attribute. But then, at some point in the future, you'll realise that in fact you need to apply the same style to something else, and you'll realise you were wrong.
Been there, done that. 8-)
这篇关于使用的style属性皱眉了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!