Differences between assigning attribute, style, and class in div

前端 未结 3 565
孤独总比滥情好
孤独总比滥情好 2021-01-26 16:38

I am wondering what is the difference between two following:

<
3条回答
  •  天涯浪人
    2021-01-26 17:02

    Having the style in an external CSS file allows it to be cached, reducing network traffic. Otherwise, it's the same as inline styling. The recommended form for inline styling is your latter proposal - style="width:100px;align:left" More here.

提交回复
热议问题