Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
colab不使用css_Css_Google Colaboratory - Fatal编程技术网

colab不使用css

colab不使用css,css,google-colaboratory,Css,Google Colaboratory,在我自己的机器上运行jupyter时,下面的代码(第一个单元格)会影响引用css规则的所有后续单元格,即,它按预期工作。当我在colab中运行它时,它没有效果。是否有一种等效的形式可用于本地和colab jupyter环境 %%html <style> .h1_cell { box-sizing: border-box; padding-top:5px; padding-bottom:5px; font-family: "Times New Roman

在我自己的机器上运行jupyter时,下面的代码(第一个单元格)会影响引用css规则的所有后续单元格,即,它按预期工作。当我在colab中运行它时,它没有效果。是否有一种等效的形式可用于本地和colab jupyter环境

%%html
<style>
.h1_cell {
    box-sizing: border-box;
    padding-top:5px;
    padding-bottom:5px;
    font-family: "Times New Roman", "Georgia", "Serif";
    font-size: 125%;
    line-height: 22px; /* 5px +12px + 5px */
    text-indent: 15px;
    background-color: #fbfbea; //#e6e6e6;
    padding: 10px;
}
</style>
%%%html
.h1_单元{
框大小:边框框;
垫面:5px;
垫底:5px;
字体系列:“新罗马时代”、“乔治亚州”、“衬线”;
字体大小:125%;
线高:22px;/*5px+12px+5px*/
文本缩进:15px;
背景色:#fbfbea;/#E6;
填充:10px;
}
后续标记单元格的标题为

<div class=h1_cell>


每个Colab输出都在一个不同的iframe沙盒中呈现。因此,任何样式更改将只应用于执行自定义的单元格的输出。

我复制了代码,样式更改不应用于执行自定义的单元格的输出。请针对不同的问题提出不同的问题。另外,请务必附上一个复制该问题的独立笔记本。我不明白/:-|现在一切正常+1。当我调查你说的话时,我同时做了另外两本colab笔记本。这不是第一次“太多”打开笔记本可能会相互干扰。很抱歉