我正在使用“阅读文档”Sphinx主题为我的文档。在原来的主题,下面给出
http://read-the-docs.readthedocs.org/en/latest/theme.html
内容或主要布局宽度被设计为移动友好。但是,对于我的项目,我希望这个更广泛。我不知道HTML,因此如果有任何人可以给我一些线索来增加内容(布局)宽度,那么会感激。
解决方法
另一个选择是在source / _static中创建一个样式表,只需要你想要的CSS。
.wy-nav-content { max-width: none; }
要么
.wy-nav-content { max-width: 1200px !important; }
确保目录在源/ conf.py中被引用 – 我认为默认情况下有一行要做,即
# Add any paths that contain custom static files (such as style sheets) here,# relative to this directory. They are copied after the builtin static files,# so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static']
然后在source / _templates / layout.html中创建一个自定义布局,并执行这样的操作以包含样式表
{% extends "!layout.html" %} {% block extrahead %} <link href="{{ pathto("_static/style.css",True) }}" rel="stylesheet" type="text/css"> {% endblock %}
假设你调用你的样式表style.css
原文地址:https://www.jb51.cc/html/232853.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。