Thursday, April 28, 2016

OpenUI5 - Adding a background image to a Panel

<Panel    class="my-panel-background">
</Panel

Then in your CSS (you are using a CSS right?) Put

.my-panel-background {
    background-image: url('../background.jpg');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 1;
}

background-size: contain; will size the background to match your panel size

The URL entry is relative to your CSS file, so path accordingly.

No comments:

Post a Comment