UI template: HTML5 Banner
An ad format with a parallax effect. It is initiated by scrolling and uses a part of the background. Usually, the banner occupies 100% of a banner’s container width on a web page. Available for both desktop and mobile devices.
Desktop | Tablet | Phone | |||
---|---|---|---|---|---|
Windows | Mac | iOS | Android | iOS | Android |
Chrome, Firefox | Safari7.1+, Chrome, Firefox | 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.
The banner with all banner assets should be archived as a .zip file. Use the .zip file with the template. The example is implemented for desktop and mobile devices.
The HTML file must define all used sources (libraries, images, etc). A recommended file name is body.html.
globalHTML5Api connects automatically, requested the following way:
globalHTML5Api objects and methods should be defined inside a requested function.
All used modules should be listed as function parameters. Two and more modules should be separated by commas. The above given code snippet shows how to include the Parallax module.
JS code for the Parallax format looks like this:
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’s 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 | |
src(URL) | – | – | Method returns the absolute path to file |
URL (optional) | String | Relative path to file |
In case the creative contains video, follow the Video player module page.
Supported file types: .jpg, .png, .gif, .svg