Package org.zkoss.zul

Class Style

  • All Implemented Interfaces:
    java.io.Serializable, 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

    <style>
     .mycls {
      border: 1px outset #777;
     }
    </style>
     

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

    Author:
    tomyeh
    See Also:
    Serialized Form
    • Constructor Detail

      • Style

        public Style()
      • Style

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

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