<code> 标签在 ipython 笔记本中的样式不正确
<code> tag not styling properly in ipython notebook
我正在尝试在 ipython 笔记本的降价单元格中使用 <code>
标签。然而,预期的样式行为正在被覆盖:
我试过:
- 根据 here 覆盖默认值 custom.css:不起作用
- 添加自定义代码单元,根据 here 加载 custom.css:不起作用
- 在包含
<code>
标签的单元格中添加 <style>
定义:不起作用
- 将内联样式添加到
<code>
标签:有效
有人知道我如何防止这种样式被覆盖吗?
看来我使用了错误的标签来定义 css;我按照 the guide here 然后设置 CSS 样式
.rendered_html code {
padding:2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
}
我正在尝试在 ipython 笔记本的降价单元格中使用 <code>
标签。然而,预期的样式行为正在被覆盖:
我试过:
- 根据 here 覆盖默认值 custom.css:不起作用
- 添加自定义代码单元,根据 here 加载 custom.css:不起作用
- 在包含
<code>
标签的单元格中添加<style>
定义:不起作用 - 将内联样式添加到
<code>
标签:有效
有人知道我如何防止这种样式被覆盖吗?
看来我使用了错误的标签来定义 css;我按照 the guide here 然后设置 CSS 样式
.rendered_html code {
padding:2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
}