开发者

Can there be two different styles applied to a single component

HTML lb = new HTML();
lb.setHTML("Hi <BR> Thanks&Regards");

i know lb.setStyleName("style"); Now this "style" will appear for the entire lb component.

For some specific reason i need Hi to have a different style and Thanks & Regards to hav a different style.

I know that we have can two d开发者_StackOverflow中文版ifferent labels and set two different text and styles But its creating problem to the logic .

Not sure whether this possible


I think this should make it:

HTML lb = new HTML();
lb.setHTML("<span class='hi-style'>Hi</span> <BR> <span class='thanks-style'>Thanks&Regards</span>");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜