Class Style
The style element allows authors to embed CSS style information in their documents. It contains CSS rules that apply to the document. The style element is typically placed in the head section of the document, but can also be used inline. The CSS contained within the style element is processed by the browser and applied to the document.
Examples:
The following convenience methods are provided for constructing instances of this bean:
See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.juneau.bean.html5.HtmlElementRawText
getText, setText, textMethods inherited from class org.apache.juneau.bean.html5.HtmlElement
accesskey, attr, attrUri, class_, contenteditable, deminimize, dir, getAttr, getAttr, getAttrs, hidden, id, lang, onabort, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, oncuechange, ondblclick, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting, self, setAttrs, spellcheck, style, tabindex, title, toString, translate
-
Constructor Details
-
Style
public Style()Creates an emptyStyleelement. -
Style
Creates aStyleelement with the specifiedHtmlElementRawText.text(Object)node.- Parameters:
text- TheHtmlElementRawText.text(Object)node. Can benull to leave the text unset.
-
Style
Creates aStyleelement with the specified inner text.- Parameters:
text- The contents of the style element.
Values will be concatenated with newlines.
-
-
Method Details
-
media
media attribute.Specifies the media types for which the stylesheet applies. This allows you to target specific devices or media types.
Common values:
"all" - All media types (default)"screen" - Computer screens"print" - Printers and print preview"handheld" - Handheld devices"projection" - Projectors"tv" - Television
- Parameters:
value- The media types for which the stylesheet applies. Can benull to unset the attribute.- Returns:
- This object.
-
type
type attribute.Type of embedded resource.
- Parameters:
value- The new value for this attribute. Can benull to unset the attribute.- Returns:
- This object.
-