Нижний колонтитул внизу с частичной горизонтальной линией - PullRequest
0 голосов
/ 10 октября 2019

Я использую Pressbooks (для публикации книги). В CSS я пытаюсь превратить строку над сносками из полной строки в частичную.

Мои навыки CSS ограничены, поэтому я не смог сделать многое.

.footnote {
   padding-left: 0;
   margin-left: 0;
   font-family: 'Lora', serif;
   font-size: 0.8888888889rem;
   font-weight: normal;
   font-style: normal;
   letter-spacing: normal;
   word-spacing: normal;
   color: initial;
   line-height: 1.5555555556em;
   text-align: left;
   text-indent: 0;
   text-transform: none;
   counter-increment: footnote;
   footnote-style-position: outside; }

.endnote::footnote-call, .footnote::footnote-call {
   font-size: 0.8em;
   line-height: 0.5em;
   vertical-align: top; }

p {
   prince-footnote-policy: keep-with-line; }

@page {
 @footnotes {
   border-top: 1px solid #aaa;
   margin-bottom: 10px;
   margin-top: 10px;
   padding-bottom: 0.3em;
   padding-top: 0.3em; } }

Я хотел бы получить частичную линию между телом и сносками, но это дает полную линию. Есть предложения?

1 Ответ

0 голосов
/ 11 октября 2019

Попробуйте использовать border-clip для этого:

@page {
  @footnotes {
    border-top: 1px solid #aaa;
    border-clip: 3in;
    padding: 0.3em 0;
    margin: 10px 0;
  }
}

Не похоже, что Prince поддерживает процентные значения для border-clip. См. здесь .

enter image description here

Вот полный пример кода для приведенного выше снимка экрана.

<!DOCTYPE html>
<html>
  <head>
    <style type="text/css">
      .footnote {
        display: prince-footnote;
        font-family: 'Lora', serif;
        font-size: 0.8888888889rem;
        font-weight: normal;
        font-style: normal;
        letter-spacing: normal;
        word-spacing: normal;
        color: initial;
        line-height: 1.5555555556em;
        text-align: left;
        text-indent: 0;
        text-transform: none;
        counter-increment: footnote;
        footnote-style-position: outside;
      }

      @page {
        @footnotes {
          border-top: 1px solid #aaa;
          border-clip: 3in;
          padding: 0.3em 0;
          margin: 10px 0;
        }
      }
    </style>
  </head>
  <body>
    <h1>This is a page title</h1>
    <p>
      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
      <span class="footnote">This is my footnote.</span>
    </p>
  </body>
</html>
...