内的图像大小。当我在缩小CSS的图形的大小,它里面的图像仍保持原始大小改变CSS的图形的大小并不影响它
HTML:
<!DOCTYPE html>
<html>
<link href="style.css" rel="stylesheet">
<head>
</head>
<body>
<div id="wrapper" style="text-align: center">
<p>
Piece of text inside a 500px width div centered on the page
</p>
<figure>
<img src="https://www.newton.ac.uk/files/covers/968361.jpg">
</figure>
</div><!--wrapper-->
</body>
</html>
CSS:
#wrapper {
width: 900px;
margin: 0 auto;
}
figure {
float: left;
display: inline-block;
width: 12px;
height: auto;
}
p {
clear: both;
}
当我修改的CSS width属性,它不会影响该网站上显示的图像的大小。
谢谢,这完美! – Jake