Why are the results of img width different in some browsers? Who is correct?
问题 This has a demo: <div style="position:absolute;"> <img src="https://i.imgur.com/iQ2rVup.jpg" style="width:100%;height:100px;" /> </div> On Codepen Chrome result: Firefox/IE result: I saw the W3C document. Absolutely locate non-displaced elements are calculated as follows. min(max(preferred minimum width, available width), preferred width) https://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width Is the result of chrome wrong? 回答1: This will probably not answer the question but I will try