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

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

QA

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

답변 1

본문

 

<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

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

 

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

 

예로, 

<style type="text/css">

#div1 {color: red; }

</style>

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

 

그 아래에

<style type="text/css">

#div1 {color: blue; }

</style>

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

 

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

jquery 로 초기화를 해보는 방법도 생각해볼 수 있을 듯 합니다.

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

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

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

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 125,873
© SIRSOFT
현재 페이지 제일 처음으로