【问题标题】:asciidoctor increase toc widthasciidoctor 增加 toc 宽度
【发布时间】:2019-07-17 11:13:30
【问题描述】:

我正在用 asciidoc 重写 AssertJ 的文档,我想增加 TOC 的宽度和内容的整体宽度(以填充空白区域)

我查看了 asciidoctor.css,发现我可以将这个属性从 toc2 宽度从 20 增加到 25em,但它搞砸了

  #toc.toc2 {
    /* initially 20em */
    width: 25em
  }

  #header,
  #content,
  #footnotes,
  #footer {
  width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 0;
    /* initially 75em,  increasing it to 100em does not play with toc when toc is increased */
    max-width: 100em;
    *zoom: 1;
    position: sticky;
    padding-left: .9375em;
    padding-right: .9375em
  }

我很高兴新的 TOC 宽度,但问题是当缩小窗口时,TOC 隐藏了内容,如屏幕截图所示:(

我不是网络开发人员,我尝试了一些没有成功的事情,可以帮助我正确设置或指向好的资源吗?

【问题讨论】:

    标签: css asciidoctor


    【解决方案1】:

    您需要在两个地方更改 css。

    body.toc2 {
       padding-left: 26em;
    }
    
    #toc.toc2 {
        /* initially 20em */
        width: 25em;
    }
    

    body 的宽度是1em,然后是你想要的宽度。

    结果

    【讨论】:

      猜你喜欢
      • 2017-04-17
      • 2017-08-11
      • 1970-01-01
      • 2016-04-01
      • 2016-10-21
      • 2015-12-18
      • 2017-11-20
      • 1970-01-01
      • 2011-05-02
      相关资源
      最近更新 更多