Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.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
Html 芯头面板“瀑布状高”聚合物不会出现_Html_Css_Polymer_Web Component - Fatal编程技术网

Html 芯头面板“瀑布状高”聚合物不会出现

Html 芯头面板“瀑布状高”聚合物不会出现,html,css,polymer,web-component,Html,Css,Polymer,Web Component,我知道问题可能与核心标题窗格父级没有高度有关 重要提示:如果其父级没有高度,则不会显示core header面板 这很好: <style shim-shadowdom> html, body { height: 100%; margin: 0; } core-header-panel { height: 100%; } </style> <body unreso

我知道问题可能与核心标题窗格父级没有高度有关

重要提示:如果其父级没有高度,则不会显示core header面板

这很好:

<style shim-shadowdom>
    html, body {
        height: 100%;
        margin: 0;
    }

    core-header-panel {
        height: 100%;
    }       
</style>    

<body unresolved>
   <core-header-panel>
      <div class="core-header">standard</div>
      <div class="content"></div>
   </core-header-panel>
</body>
但是,当我尝试将核心标题面板更改为瀑布高模式时,标题面板不会显示

<style shim-shadowdom>
    html, body {
        height: 100%;
        margin: 0;
    }

    core-header-panel.tall{
        height: 100%;
    }       
</style>    

<core-header-panel mode = "waterfall-tall">
   <div class="core-header">waterfall-tall</div>
   <div class="content"></div>
</core-header-panel>
在我的实验过程中,我引用了和

在查看了各种StackOverflow问题后,我认为主体现在不知何故覆盖了标题窗格,因为我不再明确设置高度。仅供参考,我对HTML和web开发一无所知。如有任何建议,将不胜感激

明确地说,我的问题是:

核心标题面板的父元素的主体是否正确? 我是否正确地引用了我所在部分的内容? 我怎样才能让这个该死的标题窗格出现? 更新编辑:

好的,我通过实验core header panel的demo.html找到了一个解决方案。它在我的本地主机上运行得很好,也就是说,头部会按照我的预期折叠和展开。然而,当我粘贴到jsbin中时,我并没有得到我想要的折叠效果

我认为这是由于该部分使用了px,但我不确定

另一个问题:我的导入是相对的,那么jsbin如何解析导入

第二次更新编辑:


无论导入与否,行为都是相同的,这对我来说意味着导入没有得到解决,这就是为什么与我的本地主机上的行为相比,行为是不同的

这里您丢失了标记,就在核心标题面板标记之前。这可能是错误吗

<style shim-shadowdom>
    html, body {
        height: 100%;
        margin: 0;
    }

    core-header-panel.tall{
        height: 100%;
    }       
</style>    

<core-header-panel mode = "waterfall-tall">
   <div class="core-header">waterfall-tall</div>
   <div class="content"></div>
</core-header-panel>

您需要在jsbin中提供绝对路径,因为polymer还不能作为库使用。只要换上你的,你就可以走了。