Package org.zkoss.zul

Class Style

  • All Implemented Interfaces:, java.lang.Cloneable, Component, Scope, ComponentCtrl

    public class Style
    extends AbstractComponent
    The style component used to specify CSS styles for the owner desktop.

    Note: a style component can appear anywhere in a ZUML page, but it affects all components in the same desktop.

    There are two formats when used in a ZUML page:

    Method 1: Specify the URL of the CSS file

    <style src="my.css"/>

    Method 2: Specify the CSS directly

     .mycls {
      border: 1px outset #777;

    Note: if the src and content properties are both set, the later one overrides the previous one.

    See Also:
    Serialized Form
    • Constructor Detail

      • Style

        public Style()
      • Style

        public Style​(java.lang.String src)
        src - the URI of an external style sheet.
      • Style

        public Style​(java.lang.String src,
                     java.lang.String media)
        src - the URI of an external style sheet.
        media - the media dependencies for the style sheet.