我遇到这个问题,其中图像(pics / headphoto.jpg)继承了父类的字体大小。我在本地测试代码时没有看到这个问题。但是,当我把它推到github时,照片总是被压扁到宽度:宽度为197.5px:600px。当我在控制台上打开/关闭font-size属性时,图像大小恢复正常。请告知我应该如何解决这个问题。感谢
HTML
<h3 class="well"><img src="pics/headphoto.jpg">
<br><br><div>We know the Internet is a jumbled mess to navigate so we're here to boost your online presence. <br><br> Our remote webcam tutorials are fast, flexible and fun, and will turn your headscratching computer experiences into high-fiving woohoo moments. We offer a wide range of computer tutorials from social media to email, and tailor our courses to meet your skill level.<br><br> Here's our guarantee to you: we'll conduct a 30 minute session free of charge to learn your needs. Then you decide whether to continue.
</div></h3>
CSS
.well {
display:flex;
background-color: #f5f5f5;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}
h3.well{
width:95%;
height:590px;
margin-left:20px;
margin-top:20px;
font-size:30px;
padding:40px 20px 20px 20px;
margin-bottom:20px;
max-height: 600px;
font-size:30px;
}
h3.well img{
float:left;
height: 500px;
width:600px;
padding: 0px 10px 10px 10px;
border-radius: 20px;
font-size:0px;
}