鍍金池/ 問答/HTML5  網(wǎng)絡(luò)安全  HTML/ vue 頁(yè)面切換fixed定位問題

vue 頁(yè)面切換fixed定位問題

<template>
  <div style="height: 100%;">
    <mt-header title="新建問答">
      <mt-button icon="back" slot="left" v-tap="{methods: switchView, view: 'Post'}"></mt-button>
      <mt-button icon="add" slot="right"><a @click="addQuestion()"><span class="fa fa-send" >&nbsp;發(fā)送</span></a></mt-button>
    </mt-header>
    <div class="new-post-input">
      <mt-field placeholder="請(qǐng)輸入標(biāo)題" v-model="title" style="border-bottom: 1px solid #acacac;"></mt-field>
      <mt-field placeholder="請(qǐng)輸入內(nèi)容" type="textarea" v-model="content" rows="14"></mt-field>
    </div>

    <div>
      提到的人:
      <mt-badge class="new-at-who" size="small" :type="item.type" v-for="item in atCheckList" :key="item.id">{{item.name}}</mt-badge>
    </div>
    <div>
      主題:
      <mt-badge class="new-at-who" size="small" :type="item.type" v-for="item in topicCheckList" :key="item.id">{{item.name}}</mt-badge>
    </div>

    <div class="new-post-select">
      <div class="select-items">
      <a class="select-item"><span class="fa fa-image new-post-btn"><input type="file" @change="selectFile()" class="new-post-file" /></span></a>
      <a v-tap="{methods: switchView, view: 'AtWho'}" class="select-item"><span class="fa fa-at"></span></a>
      <a v-tap="{methods: switchView, view: 'Topic'}" class="select-item"><span class="fa fa-flag"></span></a>
      </div>
    </div>
  </div>
</template>


css:

 .new-post-select {
    float: right;
    height: 40px;
    width: 100%;
    background-color: #f6f7f9;
    position: fixed;
    bottom: 0px;
  }
  .select-items{
    float: right;
    margin-top: 10px;
  }
  .select-item{
    font-size: 16px;
    margin-left: 17px;
    margin-right: 15px;
  }
  .new-post-btn{
    position: relative;
    display: inline-block;
    overflow: hidden;
  }
  .new-post-btn input{
    position: absolute;
    left: 0px;
    top: 0px;
    opacity: 0;
    -ms-filter: 'alpha(opacity=0)';
  }

我在頁(yè)面上將某個(gè)div定位在底部但是出現(xiàn)在上一個(gè)div下面,然后再定位到底部
先出現(xiàn)

圖片描述

是渲染時(shí)候順序問題嗎?
我該怎么解決?
頁(yè)面切換我使用history.pushState()

回答
編輯回答
孤毒

你這個(gè)代碼不全,其他人很難給你解答啊

2017年11月29日 05:17
編輯回答
念初

請(qǐng)問,我fixed定位也出現(xiàn)了問題。iPhone上無法全屏。。高度只有router-view的高度。有什么解決辦法嗎

2018年2月5日 11:55