UI template: HTML5 Banner
An ad format for tablets and smartphones with a parallax effect that is initiated by scrolling a page. An ad placement adjusts to the full height of the viewport while scrolling. A creative may contain video. It is highly recommended to test prepared creatives on real devices.
Desktop | Tablet | Phone | |||
---|---|---|---|---|---|
Windows | Mac | iOS | Android | iOS | Android |
– | – | ver. 8.0+ | ver. 4.4+ | ver. 8.0+ | ver. 4.4+ |
Additionally, you can check the preview of the creative by copying the link to it and viewing it from your mobile device.
Banner with all banner assets should be archived as a .zip file. Use the .zip file with a template.
The HTML file must define all used sources (libraries, images, etc). A recommended file name is body.html.
globalHTML5Api connects automatically, requested in the following way:
globalHTML5Api objects and methods should be defined inside a called function. All used modules should be listed as function parameters. The above-given code snippet shows how to include the Parallax and Player. If you need to connect several modules, indicate them by a comma.
JS code for the Mobile Parallax Fullscreen format looks the following way:
Key | Properties | Type | Description |
---|---|---|---|
resize | – | Array | Array of objects |
name (required) | String | Object name. Each object presents a particular container state (resizeState) | |
width (required) | String|Number | Banner container width | |
height (required) | String|Number | Banner container height. In case height is set as parent.innerHeight, it may be reduced using a multiplier (parent.innerHeight*number) | |
parallax (required) | Boolean | ‘true’ if the banner use parallax effect, ‘false’ if it doesn’t |
This module adds banner panels to the web page.
Method | Parameters | Properties | Type | Description |
---|---|---|---|---|
add(name, options) | – | – | – | Method to add the panel |
name | – | String | Name of the added panel | |
options | visible | Boolean | default=“false”; Panel will be rendered as visible on the page | |
src | String | Path to the file used as a panel; globalHTML5Api.src() when empty returns the path of a current file |
Method | Arguments | Type | Description |
---|---|---|---|
click(URL) | – | – | Method to call the clickthrough. Target URL may be set as a parameter or from the user interface. The URL set in the code has a higher priority than the URL set from the UI, which can lead to a conflict. Therefore, it is mandatory to use only one of the available methods. |
URL (optional) | String | Target URL |
In case the creative contains video, see the Video player module page .
Supported file types: .jpg, .png, .gif, .svg