Banner
Script: https://koin-ad.click/banner/v1/main.js
Element: <x-banner>
Global object: banner
Shared methods are in the Ad tag API. Banner adds the size attribute.
Install
html
<script async src="https://koin-ad.click/banner/v1/main.js?id=UNIT_ID"></script>
<x-banner size="728x90"></x-banner>The element can sit before or after the script. The script upgrades it when the custom element is defined.
size
size is widthxheight. If it is missing or not in this list, the banner uses 480x60.
size | Where it fits |
|---|---|
480x60 | Default. Mobile leaderboard |
728x90 | Leaderboard |
320x100 | Large mobile banner |
350x250 | Rectangle |
970x90 | Large leaderboard |
The element lays itself out from that ratio. You do not set the pixel height yourself.
theme() names
Use these selector names inside banner.theme(css).
| Name | Selects |
|---|---|
banner | The <x-banner> element |
container | The banner frame |
adaptive-box | The ratio box |
content | The creative |
button-container | The control cluster |
micro-label | The small label |
brand-label | The brand mark |
badge-icon | The badge |
svg-icon | The icon |
js
banner.theme(`
banner {
background-color: red;
}
container {
border-radius: 0;
}
`);Only the properties in your CSS change. The rest of the default rule stays.