我一直在寻找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>
答案 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"