flytreeleft/elm-ui/5.0.0

NOTE: the latest version is 6.2.0

Element.Background

color : Color -> Attr decorative msg
{ angle : Float
, steps : List Color
}
-> Attr decorative msg

A linear gradient.

First you need to specify what direction the gradient is going by providing an angle in radians. 0 is up and pi is down.

The colors will be evenly spaced.

Images

image : String -> Attribute msg

Resize the image to fit the containing element while maintaining proportions and cropping the overflow.

uncropped : String -> Attribute msg

A centered background image that keeps its natural proportions, but scales to fit the space.

tiled : String -> Attribute msg

Tile an image in the x and y axes.

tiledX : String -> Attribute msg

Tile an image in the x axis.

tiledY : String -> Attribute msg

Tile an image in the y axis.

Note if you want more control over a background image than is provided here, you should try just using a normal Element.image with something like Element.behindContent.