Overlays
![]() |
|
|---|---|
| Name | Overlays |
| Files |
|
| Related plugins | |
This plugin allows to use overlays on elements. An overlay can be a simple color overlay, or a border overlay (e.g. border glow). An overlay can have default alpha value, and a mouse over value.
Contents |
[edit] Plugin interactions
The Links plugin can automatically add a border overlay to linked elements. This can be suppressed by individually assigning the linked element an empty overlay attribute (overlay=""), or globally by setting the book@linksoverlay attribute to false.
[edit] Settings
This plugin uses or defines the following settings.
overlayfade
- Type: Number
- Default:
250
Time in milliseconds it takes for an overlay to fade between normal and mouseover states.
[edit] Attributes
[edit] Element
overlay
- Type: Definition
Determines the overlay type when the element is hovered. The basic structure of the allowed values for this attribute is as follows:
type(normal, hover, attr1, attr2, ...); type(normal, hover, attr1, ...)
Please note that attributes (in brackets) may be omitted. Each overlay has attributes, the basic ones valid for all overlays being the alpha values for the normal and hovered states:
-
normal- The normal alpha, when the object is not hovered.
-
hover- The alpha when the object is hovered.
Other parameters depend on the overlay type. Available overlays are currently color and border. Their specific attributes are
Color overlay
-
color- The color of the overlay. This should be a value between 0 and 0xFFFFFF.
Border overlay
-
type- The type of the border. Available types are: glow, solid, dotted. They currently all have the same additional attributes:
-
color- The color of the border. This should be a value between 0 and 0xFFFFFF.
-
size- The size/width of the border. Can be any positive number.
-
- The type of the border. Available types are: glow, solid, dotted. They currently all have the same additional attributes:
Multiple overlay types may be set by separating them with semicolons (;). Examples:
-
color(0.5,1,0xFF0000) -
border(0,1,dotted) -
border(0,0.75,solid,0xFF0000,3);color(0.25,0.5,0x6699CC);border
overlayfade
- Type: Number
- Default:
book@overlayfade
Time in milliseconds it takes for an overlay to fade between normal and mouseover states. Can be used to specify the fade time for one specific element.
[edit] Examples
<book plugins="overlays"> <chapter> <page> <img src="cover.jpg" overlay="color(0,0.5,0xff9900);border"/> </page> </chapter> </book>
| MegaZine3 Plugin-related articles | |
|---|---|
| Plugins | Anchors · Background Sounds · Batchpages · Bookmarks · Console · ElementIDs · Gallery · Google Analytics · Help · JavaScript · Keyboard Navigation · Links · NavigationBar · Options · Overlays · Password · PDFLinks · Print · PrintPDF · SWFAddress· Search · Sidebar · Slideshow · Titles |
| Plugin Articles | Writing a plugin · Writing a plugin II · Plugin development |
