Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/311.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.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
Python 为什么隐藏不适用于dash_html_components.Label?_Python_Html_Plotly Dash - Fatal编程技术网

Python 为什么隐藏不适用于dash_html_components.Label?

Python 为什么隐藏不适用于dash_html_components.Label?,python,html,plotly-dash,Python,Html,Plotly Dash,当我试图隐藏一个dash\u html\u组件时,用hidden标记,如下所示: app.layout = html.Label('test',hidden=True) 我仍然可以看到标签。但是当我用Div替换Label时,它确实有效。原因可能是什么 它们不用于任何回调。 标签的样式可能会覆盖它吗?但是,为什么Div的行为不同呢 谢谢大家! Label类的hidden参数似乎已中断。可以使用“样式”属性实现相同的行为: app.layout = html.Label('test', style

当我试图隐藏一个
dash\u html\u组件时,用hidden标记
,如下所示:

app.layout = html.Label('test',hidden=True)
我仍然可以看到
标签
。但是当我用
Div
替换
Label
时,它确实有效。原因可能是什么

它们不用于任何回调。
标签
样式
可能会覆盖它吗?但是,为什么
Div的行为不同呢


谢谢大家!

Label类的
hidden
参数似乎已中断。可以使用“样式”属性实现相同的行为:

app.layout = html.Label('test', style={"visibility": "hidden"})

如果要在页面上不占用任何位置的情况下隐藏标签

app.layout = html.Label('test', style={"display": "none"})