axf:box-shadow
(Auszug aus "XSL-FO ― Die Referenz" von Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Category Borders >> Box Shadow
Specifies the box shadow. [CSS3-Background] Drop Shadows: the ‘box-shadow’ property
Value: | none | inset? && [ <length>{2,4} && <color>? ]# |
Initial: | none |
Applies to: | all elements which can have borders |
Inherited: | no |
Percentages: | N/A |
Values have the following meanings.
none | No shadow is displayed. |
inset | An inner shadow is displayed.This setting is ignored with AH Formatter V6.3 Lite. V6.3[no-LT] |
The meanings of <length>s and a <color> are as follows:
- The first <length> is an offset of a horizontal shadow. It becomes a right-side shadow of a region when a positive value is specified. It becomes a left-side shadow of a region when a negative value is specified.
- The second <length> is an offset of a vertical shadow. It becomes a bottom-side shadow of a region when a positive value is specified. It becomes a top-side shadow of a region when a negative value is specified.
- The 3rd <length> must be a non-negative value and specifies the blur radius. If the value is 0, there is no blur. This setting is ignored with AH Formatter V6.3 Lite. V6.3no-LT
- The 4th <length> extends a shadow. When a positive value is specified, the region will be expanded. When a negative value is specified, the region will be reduced. V6.3no-LT
- The color of the shadow can be specified by <color>.
This combination can be specified multiply and shadows can be added several times over. V6.3
CAUTION: | The minimum unit of <length> which can be specified is 1/96in=0.265mm. The value is rounded to its multiple number. |
CAUTION: | The blur is invalid with the device which cannot output transparency like PDF/X. |
XSL-FO sample:
| <fo:root xml:lang="en" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"> | |
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| Antenna House, Inc. | |
| ||
| </fo:block> | |
| ||
| ||
| ||
| ||
| Box shadow | |
| </fo:block> | |
| </fo:block> | |
| ||
| The box shadow can be specified by axf:box-shadow. Specify axf:box-shadow="10px 10px 10px 10px darkgray", the values are an offset of a horizontal shadow, an offset of a vertical shadow, the blur radius, shadow expantion and the color o f the shadow in order. By adding the inset setting, the inner shadow can be added. | |
| </fo:block> | |
| ||
| axf:box-shadow="10px 10px 0px 0px darkgray" | |
| </fo:block> | |
| ||
| <fo:block/> | |
| ||
| ||
| axf:box-shadow="10px 10px 5px 0px darkgray" | |
| </fo:block> | |
| ||
| <fo:block/> | |
| ||
| ||
| axf:box-shadow="10px 10px 0px 8px darkgray" | |
| </fo:block> | |
| ||
| <fo:block/> | |
| ||
| ||
| axf:box-shadow="inset 10px 10px 0px 0px darkgray" | |
| </fo:block> | |
| ||
| <fo:block/> | |
| ||
| <fo:block> | |
| When an offset of the shadow is a negative value, the region of the reverse side when a positive value is specified will become the shadow. The combination of values can be specified multiply and shadows can be added several times over. | |
| </fo:block> | |
| ||
| axf:box-shadow="-10px -10px darkgray" | |
| </fo:block> | |
| ||
| <fo:block/> | |
| ||
| ||
| axf:box-shadow="10px 10px dimgray,20px 20px darkgray,30px 30px lightgrey" | |
| </fo:block> | |
| ||
| <fo:block/> | |
| ||
| </fo:flow> | |
| ||
| </fo:root> |
Output:
Tipp der data2type-Redaktion: Zum Thema XSL-FO bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an: |