2017-03-04 3 views
0

웹 사이트에서 광고를 게재하기 위해 google dfp를 사용합니다. 나는 데스크톱과 모바일에서 다른 위치에 다른 곳에서 섬기는 데 필요한, 그래서 난이처럼 만들려고 :이중 ID가 포함 된 Google dfp 광고

.mobileShow { display: none;} 
 

 
    /* Smartphone Portrait and Landscape */ 
 

 
    @media only screen 
 

 
    and (min-device-width : 320px) 
 

 
    and (max-device-width : 480px){ .mobileShow { display: inline;}} 
 

 
    .mobileHide { display: inline;} 
 

 
    /* Smartphone Portrait and Landscape */ 
 

 
    @media only screen 
 

 
    and (min-device-width : 320px) 
 

 
    and (max-device-width : 480px){ .mobileHide { display: none;}}
<div class="mobileShow"> 
 
<div id='div-gpt-ad-1421767832590-6' style='width:300px; height:250px;'> 
 
<script type='text/javascript'> 
 
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1421767832590-6'); }); 
 
</script> 
 
</div> 
 
</div> 
 
<div class="mobileHide"> 
 
<div id='div-gpt-ad-1421767832590-6' style='width:300px; height:250px;'> 
 
<script type='text/javascript'> 
 
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1421767832590-6'); }); 
 
</script> 
 
</div> 
 
</div>

그리고 난 내 코드를 추가 .mobileshow를 장소에 내가 모바일 및 데스크톱 .mobilehide에 표시하고 싶습니다. 하지만 dfp는 한 페이지에서 하나의 코드 (id) 만 제공 할 수 있습니다. 디스플레이 : 없음; 그것의 봉사하지 않으며 또한 두번째 부호는 보여주지 않는다. 도와 드릴까요?

답변