IMG
plus alt attribute if the image is part
of the content such as a logo or diagram or person (real person, not
stock photo people). —sanchothefat IMG
if you intend to have people print
your page and you want the image to be included by default. —JayTeeIMG
(with alt
text) when
the image has an important semantic meaning, such as a warning icon. This ensures that the meaning of the image
can be communicated in all user-agents, including screen
readers. IMG
if you rely on browser scaling to render an image in proportion to
text size. IMG
for multiple overlay images in
IE6. IMG
with a z-index
in
order to stretch a background image to fill its entire
window. img
instead
of background-image
can dramatically improve performance of animations over a
background. background-image
if you intend to have
people print
your page and you do not want the image to be included by default.
—JayTeebackground-image
if you need to improve
download times, as with CSS sprites.background-image
if you need for only a
portion of the image to be visible, as with CSS
sprites.以下内容为Stackoverflow上整理以作纪录,布布扣,bubuko.com
原文:http://www.cnblogs.com/bingya/p/3617717.html