Css 什么是内在的,为什么图像没有加载正确的维度?

Css 什么是内在的,为什么图像没有加载正确的维度?,css,responsive-design,Css,Responsive Design,我正在尝试加载图像,但当我在chrome开发工具中查看时,它显示300×156像素(固有:600×312像素)。为什么它使图像如此小,而我的类设置为width:auto和height:auto <img src="myImg.png" class="myImg" /> .myImg{ width: auto; height: auto; margin-bottom: 30px; } myImg先生{ 宽度:自动; 高度:自动; 边缘底部:30px; } 首先,您在i

我正在尝试加载图像,但当我在chrome开发工具中查看时,它显示300×156像素(固有:600×312像素)。为什么它使图像如此小,而我的类设置为
width:auto
height:auto

<img src="myImg.png" class="myImg" />

.myImg{
  width: auto;
  height: auto;
  margin-bottom: 30px;
}

myImg先生{
宽度:自动;
高度:自动;
边缘底部:30px;
}

首先,您在img标签上的类是hero\uu main,您提供的css是为myImg提供的。。。所以应该是一样的

<img src="myImg.png" class="myImg" />

.myImg{
    width: auto;
    height: auto;
    margin-bottom: 30px;
}

寻求代码帮助的问题必须包括在问题本身中重现代码所需的最短代码,最好是以最短的代码。请参阅。可能是其他CSS覆盖了它。
.myImg{
    width: auto;
    height: auto;
    margin-bottom: 30px;
    max-width:none;
    max-height:none;
}