无法更改sphinx_rtd_theme侧边栏的文本颜色
我正在尝试自定义使用sphinx_rtd_theme创建的文档。默认主题具有背景颜色黑色和文本颜色白色的侧边栏。我已经成功地将侧边栏的背景颜色从使用黑色的白色更改为白色
/* Sidebar header (and top-bar for mobile) */
.wy-side-nav-search, .wy-nav-top {
background: #fafafa;
}
/* Sidebar */
.wy-nav-side {
background: #fafafa;
}
,但无法找到合适的类或元素以将侧边栏的文本颜色从白色更改为黑色,因此我在白色背景上可以看到它。
I'm trying to customize the docs created using sphinx_rtd_theme. The default theme has a sidebar of background colour black and text colour white. I've successfully changed the background colour of the sidebar to white from black using
/* Sidebar header (and top-bar for mobile) */
.wy-side-nav-search, .wy-nav-top {
background: #fafafa;
}
/* Sidebar */
.wy-nav-side {
background: #fafafa;
}
but unable to find the right class or element for changing the text colour of the sidebar to black from white so that it's visible on the white background which I've done.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您需要更改特定的类并很难找到需要更改哪些CSS属性,则使用浏览器上的Inspector检查网站,将帮助您确定特别需要哪个类/ID。
右键单击要查看的区域,然后单击“检查”,然后您可以查看页面正在使用的所有元素。
If you need to change a specific class and having a hard time finding which css attributes you need to change, by inspecting your website using inspector on your browser will help you identify which class/id specifically you need.
Right click on the area you want to see then click inspect then you will be able to see all the elements that the page is using.