팝언더
스크립트: https://koin-ad.click/pop-under/v1/main.js
요소: <x-popunder>
전역 객체: popunder
공통 메서드는 광고 태그 API에 있습니다. 팝언더는 show()를 더하며, 자체 소재는 없습니다.
설치
show()는 페이지 위에 투명한 레이어를 만들고 그 요소를 돌려줍니다. 스크립트가 요소 이름을 등록하지 않았으면 null을 돌려줍니다.
html
<script>
function onKoinPop() {
popunder.show();
}
</script>
<script
async
src="https://koin-ad.click/pop-under/v1/main.js?id=UNIT_ID"
onload="onKoinPop()"
></script>요소를 직접 둘 수도 있습니다. 그래도 뷰포트를 덮습니다.
html
<script
async
src="https://koin-ad.click/pop-under/v1/main.js?id=UNIT_ID"
></script>
<x-popunder></x-popunder>show()
js
const layer = popunder.show();레이어는 뷰포트에 고정되고, 투명하며, 클릭할 수 있습니다. 이미지나 제목은 그리지 않습니다. 클릭하면 맞춰진 광고를 따라간 뒤 레이어를 제거합니다.
광고가 돌아오지 않으면 요소는 제거됩니다.
theme() 이름
| 이름 | 선택 대상 |
|---|---|
pop-under | <x-popunder> 요소 |
js
popunder.theme(`
pop-under {
background: rgb(0 0 0 / 1%);
}
`);안쪽 부분은 없습니다. 아래 페이지가 보이도록 레이어를 충분히 투명하게 두세요.