Using CSS HTML in Eclipse

I am starting to work in SAPUI5. I am building an SAPUI5 application with HTML5 in Eclipse. In the index.html page, I create the html5 page, I created the css folder under WebContent. In index.html, I added a link to the css file. But the properties in css do not affect the html page. I need to add any other code to link to a CSS file.

Css:

@CHARSET "ISO-8859-1";
body {
background-image: "image/splash-sunrise.jpg";
background-size: 100px 100px; 
background-repeat:no-repeat; 
}
+1
source share
1 answer

To use CSS in an SAPUI5 environment, you must associate your controls with a specific CSS class. You can do it as follows:

var myButton = new sap.m.Button();
myButton.addStyleClass("myButtonStyle");

And your CSS might look like this:

@CHARSET "ISO-8859-1";

.myButtonStyle {
    color:#FFCCDD;
}

Make sure you upload the CSS file to your application, for example, in your html file:

<link href="css/style.css" type="text/css" rel="stylesheet" />

, . App, , .

+1

Source: https://habr.com/ru/post/1542188/


All Articles