BackgroundMotion
The behavior whereby the background of a component moves in the opposite direction from the motion of the device.
Declaration
object BackgroundMotionProperties
| Name | Type | Description |
|---|---|---|
type Required | string | This behavior always has the type |
Mentioned in
Discussion
When you apply the BackgroundMotion behavior to a component, the background of the component moves in the opposite direction of the device motion — much like the background image on the Home Screen on iPhone. This video shows an example of the BackgroundMotion behavior.
Example
{
"components": [
{
"role": "container",
"behavior": {
"type": "background_motion"
},
"style": {
"fill": {
"type": "image",
"URL": "bundle://summer.jpg",
"fillMode": "cover",
"verticalAlignment": "top"
}
},
"layout": {
"minimumHeight": "77.2cw"
}
}
]
}