我无法垂直对齐中心#vuetify中的项目

时间:2019-07-11 08:52:54

标签: vue.js vertical-alignment vuetify.js

我一直在寻找3个小时,找不到解决我问题的方法,不知道我在做什么错 我想要的是垂直对齐这3个v-flex元素

<template>
  <div class="home">
    <v-container fluid class="pa-0">
      <v-img :src="require('@/assets/images/background.jpg')" max-height="100%">
        <v-layout align-center column>
          <v-flex class="mb-2">
            <span class="primary--text text-uppercase display-3 font-weight-thin">List</span>
            <span class="white--text text-uppercase display-3 font-weight-thin">Series</span>
          </v-flex>
          <v-flex class="mb-4">
            <h4 class="subheading grey--text">Follow the series you've been watching or are still watching!</h4>
          </v-flex>
          <v-flex>
            <v-btn color="primary" depressed flat outline to="/add">
              go to add
            </v-btn>
          </v-flex>
        </v-layout>
      </v-img>
    </v-container>  
  </div>
</template>

1 个答案:

答案 0 :(得分:0)

一种解决方案是将图像移出import requests, os, bs4 from requests_html import HTMLSession url = 'https://9gag.com/hot' os.makedirs('9gag', exist_ok=True) print('Downloading page %s...' % url) session = HTMLSession() r = session.get(url) r.html.render() find = r.html.find("img") print(find) 。然后在[<Element 'img' alt='Avatar' id='jsid-avatar' src=''>, <Element 'img' loading='lazy' src='https://miscmedia-9gag-fun.9cache.com/images/thumbnail-facebook/1557283905.6809_vudeXy_100x100.jpg'>, <Element 'img' loading='lazy' src='https://miscmedia-9gag-fun.9cache.com/images/thumbnail-facebook/1557376304.186_U5U7u5_100x100.jpg'>,..] 上使用container使其填充图像区域并在中间垂直显示内容。另外,您可能要考虑使用图像style="height: 100%;" align-center d-flex来防止在较小的屏幕上滚动。

container
max-height="100vh"