- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有以下基于 vuejs 和 vuetify 的 Web 应用程序:
new Vue({
el: '#app',
vuetify: new Vuetify(),
})
body {
overflow: hidden;
height: 100vh;
}
.stretch {
height: 100%;
width: 100%;
}
.output {
height: 100vh;
width: 100%;
overflow-y: scroll;
}
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet" type="text/css">
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet" type="text/css">
<script src="https://unpkg.com/vuetify/dist/vuetify.min.js"></script>
<div id="app">
<v-app>
<v-app-bar color="deep-purple accent-4" dark app>
<v-app-bar-nav-icon></v-app-bar-nav-icon>
<v-toolbar-title>Page title</v-toolbar-title>
</v-app-bar>
<!-- Sizes your content based upon application components -->
<v-content>
<!-- Provides the application the proper gutter -->
<v-container class="pa-0 stretch" fluid>
<v-row class="mb-5" justify="center">
<v-card max-width="280">
<v-list-item>
<v-list-item-icon>
<v-icon large color="teal darken-2">mdi-email</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title class="headline">Messages</v-list-item-title>
<v-list-item-subtitle>overview of all messages</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-card-text>
<v-row align="center" justify="center" no-gutters>
<v-col cols="5">
<p class="title">SYSTEM1</p>
</v-col>
<v-col cols="5">
<p class="subtitle-1">1111111111</p>
</v-col>
</v-row>
<v-row justify="center" no-gutters>
<v-col cols="5">
<p class="title">SYSTEM2</p>
</v-col>
<v-col cols="5">
<p class="subtitle-1">111111111</p>
</v-col>
</v-row>
</v-card-text>
</v-card>
<v-card max-width="280">
<v-list-item>
<v-list-item-icon>
<v-icon large color="teal darken-2">mdi-email</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title class="headline">Messages</v-list-item-title>
<v-list-item-subtitle>overview of all messages</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-card-text>
<v-row align="center" justify="center" no-gutters>
<v-col cols="5">
<p class="title">SYSTEM1</p>
</v-col>
<v-col cols="5">
<p class="subtitle-1">1111111111</p>
</v-col>
</v-row>
<v-row justify="center" no-gutters>
<v-col cols="5">
<p class="title">SYSTEM2</p>
</v-col>
<v-col cols="5">
<p class="subtitle-1">111111111</p>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-row>
<v-row no-gutters class="output" justify="center">
<v-col cols="7">
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
</v-col>
</v-row>
</v-container>
</v-content>
</v-app>
</div>
如你所见:
我可以向下滚动,但不能滚动到框的末尾。我用红色边框标记了它。
具体缺少什么?在 JSFiddle 上更清楚:
https://jsfiddle.net/zero_coder/1k4bt9jm/4/ . 不要忘记按运行!!
我想避免整个页面滚动,只提供内部滚动 <v-row no-gutters class="output" justify="center">
阻止。
最佳答案
这里我有一个解决方案..
你只需要从 .output
的 100vh 高度减去所有其他元素的高度
这里我们假设你的其他元素的高度是 275px
所以你只需要从 100vh(.output)
减去 275px
如下
.output{
height:calc(100vh - 275px);
}
现在您只需要找出所有其他元素的高度,例如 v-app-bar
、v-row
等。
new Vue({
el: '#app',
vuetify: new Vuetify(),
})
body {
overflow: hidden;
height: 100vh;
}
.stretch {
height: 100%;
width: 100%;
}
.output {
height: calc(100vh - 275px);
width: 100%;
overflow-y: scroll;
}
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet" type="text/css">
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet" type="text/css">
<script src="https://unpkg.com/vuetify/dist/vuetify.min.js"></script>
<div id="app">
<v-app>
<v-app-bar color="deep-purple accent-4" dark app>
<v-app-bar-nav-icon></v-app-bar-nav-icon>
<v-toolbar-title>Page title</v-toolbar-title>
</v-app-bar>
<!-- Sizes your content based upon application components -->
<v-content>
<!-- Provides the application the proper gutter -->
<v-container class="pa-0 stretch" fluid>
<v-row class="mb-5" justify="center">
<v-card max-width="280">
<v-list-item>
<v-list-item-icon>
<v-icon large color="teal darken-2">mdi-email</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title class="headline">Messages</v-list-item-title>
<v-list-item-subtitle>overview of all messages</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-card-text>
<v-row align="center" justify="center" no-gutters>
<v-col cols="5">
<p class="title">SYSTEM1</p>
</v-col>
<v-col cols="5">
<p class="subtitle-1">1111111111</p>
</v-col>
</v-row>
<v-row justify="center" no-gutters>
<v-col cols="5">
<p class="title">SYSTEM2</p>
</v-col>
<v-col cols="5">
<p class="subtitle-1">111111111</p>
</v-col>
</v-row>
</v-card-text>
</v-card>
<v-card max-width="280">
<v-list-item>
<v-list-item-icon>
<v-icon large color="teal darken-2">mdi-email</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title class="headline">Messages</v-list-item-title>
<v-list-item-subtitle>overview of all messages</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-card-text>
<v-row align="center" justify="center" no-gutters>
<v-col cols="5">
<p class="title">SYSTEM1</p>
</v-col>
<v-col cols="5">
<p class="subtitle-1">1111111111</p>
</v-col>
</v-row>
<v-row justify="center" no-gutters>
<v-col cols="5">
<p class="title">SYSTEM2</p>
</v-col>
<v-col cols="5">
<p class="subtitle-1">111111111</p>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-row>
<v-row no-gutters class="output" justify="center">
<v-col cols="7">
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
<v-banner two-line>
<v-avatar slot="icon" color="deep-purple accent-4" size="40">
<v-icon icon="mdi-lock" color="white">
mdi-lock
</v-icon>
</v-avatar>
Three line text string example with two actions. One to two lines is preferable. Three lines should be considered the maximum string length on desktop in order to keep messages short and actionable.
</v-banner>
</v-col>
</v-row>
</v-container>
</v-content>
</v-app>
</div>
关于html - 最后看不到滚动 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57620785/
我一直在尝试处理一个类项目,在该项目中我必须设置一个面向 GUI 的转换程序,并且我试图将数据从我的类的方法传递到 ActionListener,但监听器是告诉我文本字段不存在。它位于同一个包和类中,
我在服务器上有两个版本的 PHP(Centos 6.8) - 5.6 和 7.1 我的 Nginx 使用 php7.1,它不是默认的 PHP 解释器。 经过一番与 yum 的斗争后,我安装了 php7
我正在尝试为 BEAGLE 安装 OpenCL .首先,我下载了 intel_sdk_for_opencl_applications_2020.3.494.tar.gz 来自 here .然后我解压并
我想知道为什么我在 controlPanel 中看不到 topPanel 这是我的代码: import java.awt.BorderLayout; import java.awt.Color; im
在我的 urls.py 中,我有以下内容: urlpatterns = patterns('', # Examples: #url(r'^$', 'welcome_page.home'
非常感谢大家的帮助! 在 GetProductByID 下,我收到一条错误消息“int does not contain a definition for FirstOrDefault”。 using
1) 我已经通过 my computuer -> System variables; 设置了变量 CLASSPATH 2) 重新启动控制台并键入 echo %CLASSPATH%,CLASSPATH
我已经看过这篇文章了PHP doesn't see mysql extension ,但这对我没有帮助。 我使用: Windows Seven(在虚拟机中为 32 位,在真实电脑上为 64 位) 带
当我尝试通过输入 python3 来验证 Python3 是否可以看到 Django 时其次是 import django进入终端(这样我就可以打印 Django 的版本号),我得到以下错误: Tra
我已经使用 easy_install 安装了 pygraphviz但是当我启动 python 时出现错误: >>>import pygraphviz as pgv Traceback (most re
在向 Microsoft 报告之前,我想在这里问一下。我有一个问题,我无法看到我的 WinUI 3 应用程序的实时可视化树。我什至看不到应用程序内工具栏。我可以在 WPF 和 UWP 应用程序中看到,
我对缺乏基本的了解和 内。 我希望看到 39 个 svg 子元素,100 像素高,每个子元素中都有清晰的文本。 http://jsfiddle.net/pn5sj8ge/ 最佳答案 发生这种情况的原因
我正在尝试设置一个新的持续集成服务器,该服务器利用 Phing 和 PHPUnit 自动运行测试用例。 我已经用 Pear 安装了 Phing: pear channel-discover pear.
lua -e "print(package.path)" ./?.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib
我刚刚从 https://github.com/llvm/llvm-project.git 安装了 clang++ 和 libc++ .尝试运行时: clang main.cpp -stdlib=li
我一直在使用 Highstock 图表,我注意到当图表中有很多点时,无法使用工具提示查看最后一个点: 您可以看到工具提示显示了 5 月 9 日的点,而还有一个显示 5 月 10 日的点(正如您在范围选
This question already has answers here: error_log message is truncated when using print_r (5个答案) 1年前
我在编写 Selenium 测试来检查我的应用程序时遇到问题。我想测试的是,当用户输入正确的登录名/密码时,会显示正确的页面并且用户已登录。 主要问题是我的登录表单是作为 AngularJS 指令生成
我正在尝试在 Azure 服务上发布我的 ASP.NET Core 应用程序。这有效,但是当我尝试使用应用程序功能时,我收到消息 Your App Service app is up and runn
在我的 ionic 应用程序中,我有一个功能,用户应该在应用程序的导航栏中看到水平点线,单击它们,然后应该出现一个弹出菜单,其中包含两个菜单项(添加到收藏夹并添加评论)。下图说明了我的观点。 问题是这
我是一名优秀的程序员,十分优秀!