gpt4 book ai didi

css - asciidoctor 增加 toc 宽度

转载 作者:行者123 更新时间:2023-11-28 10:59:26 24 4
gpt4 key购买 nike

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

我查看了 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 隐藏,如屏幕截图所示 :(

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

enter image description here

最佳答案

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

body.toc2 {
padding-left: 26em;
}

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

body 的宽度将比您想要的宽度多 1em

结果

Results

关于css - asciidoctor 增加 toc 宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57074547/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com