- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在尝试为 Flex Layout 设置图像只需要居中对齐而不是文本。
目前我有两个 flex 框,第一个框是文本,第二个是文本和图像,所以当我对齐元素时,两者也对齐中心,我只需要图像来对齐中心而不是文本。
flex-container {
border: 1px solid;
display: flex;
align-items: center;
}
.flex-item {
flex: 1 auto;
border: 1px solid green;
height: 100%;
display: flex;
justify-content: center;
}
.flex-center {
align-items: center;
}
<div class="flex-container">
<div class="flex-item">I'm top dog!
</div>
<div class="flex-item flex-center">
I want to be vertically centered! And I am!
</div>
</div>
<div class="flex-container">
<div class="flex-item">I'm top dog!Previous. Next. Image for Scented Lolly Dude Small Hardtop Pencil Case from Smiggle ... Tall Pencil Pack X24 any 2 for $20 Tall Pencil Pack X24 $12.95 AUD. Previous. Next. Image for Scented Lolly Dude Small Hardtop Pencil Case from Smiggle
... Tall Pencil Pack X24 any 2 for $20 Tall Pencil Pack X24 $12.95 AUD.
</div>
<div class="flex-item flex-center">
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEhUTEhMVFRUXFhcZFxgXFRoYFxoYFxcYGBcYFxcYHyggGBolHRgYITEhJykrLi4uGB8zODMtNygtLisBCgoKDg0OGhAQGi0lHyUvLS0tLS0vKystLS0tKy0uLS0tLS0tLS0tLS0tLSsyLy0tLTUrLS0rLi0tLS0tLS0tLf/AABEIANAA0AMBIgACEQEDEQH/xAAcAAACAwEBAQEAAAAAAAAAAAADBAACBQYBBwj/xABJEAACAQIEBAQCBQkDCwQDAAABAhEAAwQSITEFQVFhEyJxgTKRBlKhscEHFBUjQmKS0fByguEWM0Njc5SistLT8VSDs8JFU1X/xAAXAQEBAQEAAAAAAAAAAAAAAAAAAQID/8QAJREAAgICAwACAgIDAAAAAAAAAAECERIhAzFBE1EiYXHhI4Hw/9oADAMBAAIRAxEAPwD7jUqVKAlSvCa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XQqCO6/yil7uOcsrmzDLzBIkdG01HMdKWFF+nWcVxCmy5AllUsPVQTHuJHvQ3uZxYRGy+UOTEnKqgCOhJYQTMZdq588akEGy+oI+IHf2oWE4ll1Nq4TlVdI2QQN+5JpZlRZ22HtIoAXQDYTPuTzJ686P4YrjV43/q7n2V6n0iKnVXiOgkEe8EH2jvS0Z+NnRYSzGIvA/D4dpwfU3M3yyz71bAYQkB3I1JdVAOmbYsTu2WB0FczifpDnzDzgMgQ+XUeYlo1+qYp7/Khe/8FLRpqR0jWfcVm28CEvrr5GUkLyV0BAg8hkd9O1Z/+VSdG/hNKcR+kK3EKrmVhqjFZhoIE67akehNLRIqRvcOckwRGZRcmdTnYiI5QAoqvF1/VsPrQnuzBfxrnsPx1Q0w8C2iAZfqyW/D5UwfpAvR/wCD/Glosou+joXk+9VKHryrmLn0hMiEaATOmpEaR019dDSDYtiVIVlGYOcqzlcqyvkk6hpBk7EEwZpYXH9nW4rCq8HQOuqPElSOfcdvWlL2NXOVchWuWmVkn9pFYgr9ZSufXsKy14o2UBbbmBEu+vvA1NeXTiLy5QtsD0JI9JOhpZYxZ0Vi+ptpOoKLI6gqJ+ysfD4pksXLcw+d7ak9DChyN4y+Y1W3wrEsNXIEAQug09Kf4f8ARsgyTJ70sqjQ9wlTsDMxLEamBA9ABoBXV4RIFZ+A4dlrWVYoVL0tUqVKFJUqVKAE9uaVu4IHlT9eRQGQ3ClPKq/odOgrZipFAZA4Mn1RXo4On1RWvUoDJPB0+qKoeCWz+yK2alAYv6Bt/VFe/oG19UVs1KlAxv0Da+qPlXo4Fb+qPlWxUqgyl4LbH7Iq36It/VFadSlAyW4Mn1RXq8HT6orVqVKBnLwpOgo6YBB+yKaqVQCayI0AFBFmm68igKotXqVKA8NQV7UoD//Z"
/>
</div>
</div>
This是 Plunker 有人知道吗
预计
最佳答案
从此 div
中删除 flex-center
<div class="flex-item">
I want to be vertically centered! And I am!
</div>
将类保留在包含图像的 div
上
<div class="flex-item flex-center">
<img src="" />
</div>
将CSS中的.flex-center
改为
.flex-center {
align-self: center;
}
关于html - Display Flex 将文本垂直顶部和图像居中对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45811588/
我希望能够像在 jsFiddle 中那样将元素列表对齐到右侧的复选框。这是如何做到这一点的最佳实践?传统上我从来没有 float 过相互嵌套的元素,所以我想确定这是否是解决此问题的正确方法。 代码(h
指令.align n是什么意思在数组中做什么? 更具体地说,假设我有以下部分代码: array: .align 2 .space 800 它的重要性是什么,为什么不跳过它并使用
基本上我正在寻找一种强制特定相对对齐的方法 即我想保证其他一些值(value) m s.t m > n alignment_of(foo) % 2^m == 2^n IE: .align 2^m; .
在我的代码中,我必须考虑一个数组数组,其中内部数组具有固定维度。为了使用 STL 算法,将数据实际存储为数组的数组很有用,但我还需要将该数据传递给 C 库,该库采用扁平化的 C 样式数组。 如果能够以
横向上,我想显示两个位图,并在它们之间显示一个标签字段。 代码看起来很简单,但所有字段都添加在屏幕左侧。 HorizontalFieldManager hfm = new HorizontalFiel
我想绘制一个变量名称及其符号。因为某些变量的名称很长,所以我试图将换行符与轴标签混合使用。这会导致对齐中发生有趣的事情: par(mar=c(1,12,1,1)) plot( y=1:6, 1:6,
使用这个脚本 df <- data.frame(x = 1:5, y = 1:5, color = letters[1:5]) ggplot(df, aes(x, y, fill = color))
我有一个带有标量字段的结构,比如妈妈,我想在屏幕上对齐的列中显示结构的值,可能还有一些标题。这是一个最小的工作示例: mom.a = 1; mom.b = 2; mom.veryLongName =
在 iOS6 中,我使用自动布局。 我有 2 个以编程方式创建的 View v1 和 v2。 v2 作为 subview 添加到 v1 v1 的约束已通过编程方式创建(此处未显示)。 我希望 v1 和
概述 浏览时operator new, operator new[] - cppreference.com ,似乎我们有许多选项来分配具有特定对齐要求的对象数组。但是,没有指定如何使用它们,而且我似乎
Widget _createProfileContainer() { return new Container( height: 64.0, child: ne
我正在使用 Bootstrap 和语义 UI 的组合来设计和对齐我的网页。目前,我在将页面 api map 和博客文章在整个页面上对齐时遇到问题,而不是像图像所示 那样堆叠在一起。 这是我的底层代码,
所以我已经添加了标签和所有内容,但我仍然在格式化和对齐所有内容时遇到问题。计算按钮显然应该居中。我知道使用 gridbag 将框架分割成坐标系,当一列大于其他列时,它会调整其他列并将其抛弃(对吗?)。
我必须将程序上的按钮对齐到中间,我运行的当前代码但显示的按钮与程序一样大,我想要一个特定大小的中心按钮,这是我尝试过的 /** * Created by Timk9 on 11/04/2016.
我正在尝试将 VIM 作为我的 ruby/rails 编辑器。太胖了,我对它的功能印象深刻 并且我能够安装以下插件以提供更好的 IDE 体验 自动配对 Better-snipmate-snippe
在结构内对齐成员的最佳或常规方法是什么?添加虚拟数组是最佳解决方案吗? 我有一个 double 的结构和 double 的三倍是吗? struct particle{ double mass;
我正在尝试对齐我的输出,但由于某种原因我无法做到我多么想要它,这真的很令人沮丧。标题不会正确对齐。我不知道我是否正确使用了 setw()。 #include using std::cout; usi
我正在开发一个 android 应用程序,其相对布局如下所示。 这是应用程序在屏幕上的显示方式的 imgur 链接:http://imgur.com/c4rNJ .我希望“Text 1”出现在“a l
我不确定为什么我不能在下面的代码中调整按钮的位置。我有几行设置了边界,但我一定遗漏了一些东西。 public DayGUI() { mainFrame = new JF
我有一个 html 页面,我想在页面底部对齐一个 iframe,使 iframe 占据所有宽度,我无法在底部对齐 iframe。请找到底部的 iframe 标签页面。 The rest of th
我是一名优秀的程序员,十分优秀!