2015-06-21 19 views

回答

0

如果工具栏很高,但由于用户向下滚动列表而收缩,我认为晶圆厂必须随之移动。我能找到的最佳方式包括硬编码工具栏的2个可能高度,以及工具栏使用的转换。

#core_toolbar { 
    color: rgb(255, 255, 255); 
    font-size: 1.2rem; 
    font-weight: 400; 
    background-color: rgb(33, 150, 243); 

    #create_button { 
    position: absolute; 
    top: calc(64px - 28px); 
    right: 24px; 
    z-index: 1; 
    transition: top 0.18s ease-in; 
    } 
} 
#core_toolbar.tall { 
    #create_button { 
    position: absolute; 
    top: calc(192px - 28px); 
    right: 24px; 
    z-index: 1; 
    transition: top 0.18s ease-in; 
    } 
} 

什么特别之处HTML:

<core-header-panel mode="waterfall-tall" id="core_header_panel"> 
    <core-toolbar id="core_toolbar" class="animate tall"> 
    <div></div> 
    <paper-fab id="create_button" icon="add"></paper-fab> 
    </core-toolbar> 
    <section></section> 
</core-header-panel>