Code with Benji
Code with Benji

Reputation: 715

how to make a color gradient for a container background in codename one

tried to use CSS but failed is there a way to make a container background look like below example

Upvotes: 1

Views: 84

Answers (1)

Francesco Galgani
Francesco Galgani

Reputation: 6249

Both the linear-gradient and radial-gradient CSS functions are fully supported by the Codename One CSS library (accorindg to the Codename One Developer Guide). But the background you want is not linear neither radial, as far as I know. So I don't think you can generate a similar image using a background gradient.

See:

You can use cn1-background-type, background-image and cn1-source-dpi to have an image as background.

See: https://www.codenameone.com/manual/css.html

Upvotes: 2

Related Questions