채택완료

Style 기능 disable 되게 하는 방법,,

2018-01-03 (수) 11:39:16 2,183

<style>
  
  @media screen and (min-width: 750px) { 
    #ProductCardImage-collection-template-424120352800 {
      max-width: 229.99999999999997px;
      max-height: 345px;
    }
    #ProductCardImageWrapper-collection-template-424120352800 {
      max-width: 229.99999999999997px;
      max-height: 345px;
    }
   } 
    
    @media screen and (max-width: 749px) {
      #ProductCardImage-collection-template-424120352800 {
        max-width: 499.99999999999994px;
        max-height: 750px;
      }
      #ProductCardImageWrapper-collection-template-424120352800 {
        max-width: 499.99999999999994px;
      }
    }
  
</style>

위 스크립트를 수정할 수 없는 페이지에 있어서 이걸 어떻게 수정할 수 있나요?

어떤 특이한 기능으로 수정 할 수 있을까요?

|

답변 1개 / 댓글 2개

채택된 답변
+20 포인트
2018-01-03 (수) 12:59:47

동일한 스타일 시트 정의 내용이 있는 경우, 

동일 레벨의 경우에는, 좀 더 나중에 선언된 것에 우선순위가 있습니다.

예로, 

<style type="text/css">

#div1 {color: red; }

</style>

이 HTML 소스상 상단에 표기되는 경우,

그 아래에

<style type="text/css">

#div1 {color: blue; }

</style>

라고 해주면 나중에 정의해준 것으로 적용됩니다.

위와같은 임시방편적 방법 사용을 검토해볼 수 있지 않을까 합니다.

답변에 대한 댓글 2개

역시 이 방법 밖에 없겠죠?? ㅎㅎ
2018-01-03 (수) 13:53:11
jquery 로 초기화를 해보는 방법도 생각해볼 수 있을 듯 합니다.

작동이 잘 될지는 모르겠습니다.

$(function()) {
$('#ProductCardImage-collection-template-424120352800').removeAttr( 'style' );
});

// $('#ProductCardImage-collection-template-424120352800').css('max-width', ''); ??

답변을 작성하려면 로그인이 필요합니다.