Target an HTML element from code, to change Style properties

There were two problems with your code

  1. You were setting the background color in your native library to ‘color’ instead of using the value of the variable color.

  2. Your background image was preventing your background color from being applied. Best to use background property instead of background-color or background-image to handle both cases.

Here is a fixed clone link

1 Like