2015-06-21 23 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>