2017-04-20 2 views
-2

휴대 전화에서 사진을 숨기고 싶습니다. 내가 무슨 짓을했는지휴대 전화에서 사진을 숨기기

은 다음과 같습니다

<style> 
    @media only screen and (max-width: 500px) { 
     .kredit1 { 
      width: 100%; 
      display: none; 
     } 
    }  
</style> 

그리고 난이 사업부에이 클래스를 퍼트 :

<div class="" style="float: right;"> 
    <img src="_assets/_img/AAbisnode.png" style="width: 100%;"> 
</div> 

하지만 난 이런 짓을 할 때 웹 페이지는 단지 빈졌다.

+1

코드를 보시려면 –

+2

클래스'kredit1'을 가진 요소가 없습니다 ... (또한'display : none'을 쓰면 너비 규칙이 더 이상 사용되지 않습니다) – KarelG

+0

큰 화면의 경우에도 마찬가지로 오른쪽으로 바뀌 었음 –

답변

0

사용 @media screen and (max-width: 600px) 이미지

.kredit1 { 
 
    width: 100%; 
 
    display: block; 
 
} 
 

 
@media screen and (max-width: 600px) { 
 
    .kredit1 { 
 
    display: none; 
 
    } 
 
}
<style> 
 

 
</style> 
 
and i putted this class in to this div: 
 

 
<div class="kredit1 " style="float: right;"> 
 

 
    <img src="_assets/_img/AAbisnode.png" style="width: 100%;"> 
 

 

 
</div>

1

클래스 태그가 사업부에 비어를 숨 깁니다. 이 시도 : 이미지를 숨길 수 :

<style> 
    @media only screen and (max-width: 500px) { 
     .kredit1 { 
      width: 100%; 
      display: none; 
     } 
    }  
</style> 


<div class="kredit1" style="float: right;"> 
    <img src="_assets/_img/AAbisnode.png" style="width: 100%;"> 
</div> 
1

당신은 "(600PX 최대 폭) @media 화면과"를 사용합니다. 이것은 효과가있다.

관련 문제