1

I'm trying to create some Famo.us items and having problems with the approach and wondered if anyone can help.

I am trying to create a View, within which is a Surface. I would like the background of that Surface to be transparent, but I want the Text to be fully visible.

I can solve this with 2 Surfaces on top of each other but that sounds silly, so wondered if anyone can help. My code is:

  var infobarContent = new Surface({
    size: [true, true], 
    properties: {
      cursor: 'pointer',
      borderRadius: '5px',
      padding: '10px',
      backgroundColor: 'rgb(71,3,101)',
      color: 'white',
      textAlign: 'center'
    }
  });
  var infobarContentModifier = new StateModifier({ /*opacity: 0.4,*/ align: [0.05, 0.1], origin: [0.05, 0.8] });

I did try adding a Class to the Surface, but it seems to ignore any background opacity. I also tried to use "rgb(71,3,101, 0.4)" in the Properties of the Surface - as would work in normal websites - but this does not work either.

Any help would be brilliant :)

Thanks, and hope you are enjoying your Weeekend.

:)

Pandafinity
  • 713
  • 2
  • 7
  • 19

1 Answers1

1

The problem is your BackgroundColor rgb(71,3,101, 0.4)

The correct CSS value is rgba(71,3,101, 0.4)

Kraig Walker
  • 812
  • 13
  • 25