Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/71.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
Vue.js 如何将引导vue中的导航条固定在中心位置?_Vue.js_Gif_Bootstrap Vue - Fatal编程技术网

Vue.js 如何将引导vue中的导航条固定在中心位置?

Vue.js 如何将引导vue中的导航条固定在中心位置?,vue.js,gif,bootstrap-vue,Vue.js,Gif,Bootstrap Vue,如何将导航栏组件置于中心?这是我第一次这样做,我得到了它的大部分好,但我只是不能解决这个问题,所以它看起来并不奇怪 <template> <div class="container"> <header> <h1>GIF'S APP</h1> <form> <span class="font-semibold mr-2 text-left flex-auto text-

如何将导航栏组件置于中心?这是我第一次这样做,我得到了它的大部分好,但我只是不能解决这个问题,所以它看起来并不奇怪

<template>
  <div class="container">
    <header>
      <h1>GIF'S APP</h1>
      <form>
        <span class="font-semibold mr-2 text-left flex-auto text-white">Search for the coolest gifs</span>
        <div>
          <b-nav-form>
            <b-input-group>
              <b-form-input id="input-small" size="sm" type="text" v-model="search" />
              <b-button class="btn-success" type="button" v-on:click="searchNewGifs()">Search</b-button>
              <div class="gifs--container">
                <Gif v-for="gif in gifs" v-bind:key="gif.id" v-bind:data="gif"></Gif>
              </div>
              <b-button
                class="btn-success"
                type="button"
                v-if="!stopNextPage"
                v-on:click="getNextPage()"
              >Next Page</b-button>
            </b-input-group>
          </b-nav-form>
        </div>
      </form>
    </header>
  </div>
</template>

GIF的应用程序
寻找最酷的礼物
搜寻
下一页

使用class
mx auto
水平中心和class
my auto
垂直中心,如果您想使水平中心和垂直中心成为垂直中心,请使用
m-auto
并注意:非常重要的是父级具有样式
dispaly:flex
,并且可用于该样式的类是
d-flex