Вход/Регистрация
XSLT
вернуться

Холзнер Стивен

Шрифт:

Для демонстрации я воспользуюсь элементом

<fo:block-container>
, который, как можно предположить, выступает в качестве контейнера блоков. Удобно то, что такие контейнеры блоков поддерживают свойства абсолютного позиционирования, которые сами блоки не поддерживают.

С элементом

<fo:block-container>
можно применять следующие свойства:

• общие свойства абсолютной позиции:

absolute-position
,
top
,
right
,
bottom
,
left
;

• общие свойства границ, заполнения и заднего фона:

background-attachment
,
background-color
,
background-image
,
background-repeat
,
background-position-horizontal
,
background-position-vertical
,
border-before-color
,
border-before-style
,
border-before-width
,
border-after-color
,
border-after-style
,
border-after-width
,
border-start-color
,
border-start-style
,
border-start-width
,
border-end-color
,
border-end-style
,
border-end-width
,
border-top-color
,
border-top-style
,
border-top-width
,
border-bottom-color
,
border-bottom-style
,
border-bottom-width
,
border-left-color
,
border-left-style
,
border-left-width
,
border-right-color
,
border-right-style
,
border-right-width
,
padding-before
,
padding-after
,
padding-start
,
padding-end
,
padding-top
,
padding-bottom
,
padding-left
,
padding-right
;

• общие свойства полей для блоков:

margin-top
,
margin-bottom
,
margin-left
,
margin-right
,
space-before
,
space-after
,
start-indent
,
end-indent
;

•

block-progression-dimension
;

•

break-after
;

•

break-before
;

•

clip
;

•

display-align
;

•

height
;

•

id
;

•

inline-progression-dimension
;

•

keep-together
;

•

keep-with-next
;

•

keep-with-previous
;

•

overflow
;

•

reference-orientation
;

•

span
;

•

width
;

•

writing-mode
.

В следующем примере (листинг 12.3) я использую контейнеры блоков как оболочки для блоков, которые я хочу поместить в определенные места страницы

Листинг 12.3. blockcontainer.fo

<?xml version="1.0" encoding="UTF-8"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

 <fo:layout-master-set>

<fo:simple-page-master margin-right="20mm" margin-left="20mm"

margin-bottom="10mm" margin-top="10mm" page-width="300mm"

page-height="400mm" master-name="page">

<fo:region-body margin-right="0mm" margin-left="0mm"

margin-bottom="10mm" margin-top="0mm"/>

<fo:region-after extent="10mm"/>

</fo:simple-page-master>

 </fo:layout-master-set>

 <fo:page-sequence master-name="page">

<fo:flow flow-name="xsl-region-body">

<fo:block-container height="4cm" width="12cm" top="0cm" left="0cm"

position="absolute">

<fo:block text-align="start" line-height="18pt"

font-family="sans-serif" font-weight="bold" font-size="14pt">

Starpowder

</fo:block>

<fo:block text-align="start" line-height="18pt"

font-family="sans-serif" font-size="14pt">

The Starpowder Building:

</fo:block>

<fo:block text-align="start" line-height="18pt"

font-family="sans-serif" font-size="14pt">

1 Starpowder Avenue

</fo:block>

<fo:block text-align="start" line-height="18pt"

font-family="sans-serif" font-size="14pt">

New York. NY. 10011

</fo:block>

</fo:block-container>

<fo:block-container height="1cm" width="6cm" top="0cm" left="14cm"

position="absolute">

  • Читать дальше
  • 1
  • ...
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • ...

Ебукер (ebooker) – онлайн-библиотека на русском языке. Книги доступны онлайн, без утомительной регистрации. Огромный выбор и удобный дизайн, позволяющий читать без проблем. Добавляйте сайт в закладки! Все произведения загружаются пользователями: если считаете, что ваши авторские права нарушены – используйте форму обратной связи.

Полезные ссылки

  • Моя полка

Контакты

  • chitat.ebooker@gmail.com

Подпишитесь на рассылку: