Hi Michael,
EGL uses CSS and yes you can use the CSS provided in the example.
Set a CSS class on the TextLabel and define the class in the CSS file.
package ruihandlers;// RUI Handlerimport com.ibm.egl.rui.widgets.GridLayout;import com.ibm.egl.rui.widgets.TextLabel;import com.ibm.egl.rui.widgets.GridLayoutData;////handler TestCssAnimation type RUIhandler {initialUI = [ ui ],onConstructionFunction = start, cssFile="css/TestRichUI.css", title="TestCssAnimation"} ui GridLayout{ columns = 3, rows = 4, cellPadding = 4, children = [ tl ] }; tl TextLabel{ layoutData = new GridLayoutData{ row = 1, column = 1 }, text="Breaking news", class="animate" }; function start() end end
CSS file TestRichUI.css:
.animate { position:relative; background:white; overflow:hidden; text-align:center; font-size: 18pt}.animate:before { content:''; top:0; bottom:0; width:100%; box-shadow:0 0 8em 5em white, inset 0 0 3em 5em white ; position:absolute; left:100%; animation: slide 4s infinite alternate linear;}@keyframes slide { 0% { left:0; }}
Ortwin
Ortwin