2016-08-22 6 views
-1

내 CSS 파일에서 방금 부트 스트랩 문서에서 반응 형 이미지 (img-responsive) 클래스를 추가했으나 작동하지 않습니다. 이 img (doc)에 추가해야합니다 동안부트 스트랩 이미지 반응 형

<div class="app"> 
    <div class="img-responsive"> 
      <img src="images/build-icon.png" alt="Icon of the App"> 
    </div> 

답변

3

.img-responsive 클래스는 Bootstrap docs에 따라 이미지 자체에 있어야합니다.

<img src="images/build-icon.png" class="img-responsive" alt="Icon of the App"> 

만이 반응하기 위해 이미지에 max-width: 100%;height: auto;display: block;를 추가해야하지만.

0

당신은 div에이 클래스를 추가 할 수 있습니다. 이 문제를 사용해보십시오 :

<div class="app"> 
     <div><img src="images/build-icon.png" alt="Icon of the App" class="img-responsive"></div> 
</div> 
관련 문제