我想在我的css文件中设置一些基本的颜色代码。
我的css如下所示:
@colorGood: #32CD32;
@colorOk: #FFA500;
@colorBad: #FF4500;
.testClass{
width: 80%;
background: @colorGood;
}我的XML有一个按钮控件如下所示:
<Button id="testBtn" class="testClass" />我在web-ide中创建了上面的视图和css。当我运行它时,它不会显示变量中提到的颜色。
发布于 2016-07-20 07:29:30
有一次,我不得不使用我自己的CSS文件,有一件事是必须的:包括定制的CSS。不确定这是否是最佳实践;至少对我有用:在我的组件init代码中,我添加了以下内容:
jQuery.sap.includeStyleSheet({
url: jQuery.sap.getResourcePath("<full path to the CSS file>"),
id: "custom_style"
});其中还包括您的姓名空间。假设您的名称空间是com.foo.project,并且名称为mystyle.css的css文件存储在css项目文件夹中,那么您的完整路径是:"com/foo/ project /css/mystyle.css“。
https://stackoverflow.com/questions/38474653
复制相似问题