What is the purpose of setting width equal to an asterisk in inline styles?

前端 未结 3 1601
甜味超标
甜味超标 2020-12-17 18:42

So, maybe this is a typo but I came across some old code:


Was this a typo? or does this do something

3条回答
  •  萌比男神i
    2020-12-17 19:24

    That's not "inline style", but legacy HTML that should be avoided in favor of CSS. But, to answer your question, it means, essentially, "fill". But, in practice it has no effect and can be safely removed.

    http://jsfiddle.net/sn4qn/5/

    Perhaps it's there as an indicator to future developers that the width was intended to be set automatically by the browser.

提交回复
热议问题