- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图在卡片正文中对齐样式化的操作按钮,但没有成功。
我希望卡片的高度相同,因此从视觉上看,所有卡片的底部边框都是垂直对齐的。该按钮位于每张卡片的底部。
示例如下: https://stackblitz.com/edit/angular-py7awb
希望使用可用作最佳实践的通用标准方法。
最佳答案
这会将按钮直接放置到底部,“1rem”将相对于父 div(在本例中为“nz-card”)从底部到顶部增加一个距离
<div nz-col nzXs="8">
<nz-card nzTitle="Where does it come from?" style="height: 100%">
<div style="margin-bottom:2rem">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</div>
<div nz-row nzType="flex" nzJustify="space-between" style="position:absolute; bottom:1rem">
<button nz-button nzType="primary" nzAlign="bottom" >Ask more</button>
</div>
</nz-card>
</div>
对于“询问更多”按钮,您需要移除周围的“div”,因为它将位于第一个父 div 的底部,而不是“nz-card”底部
唯一的问题是,如果文本太多,它会与按钮重叠,这就是为什么我在文本周围添加了一个 div,边距为 2 rem,以便为按钮留出空间
<div style="margin-bottom:2rem">
<p>Lorem Ipsum is simply </p>
</div>
关于css - NG-ZORRO nz卡体内对准,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58411556/
我有一个特定的问题,例如: 我不喜欢 ng-zorro table 上的边距。在我的浏览器中,我可以看到它从 .ant-table-small>.ant-table-content>.ant-tabl
我需要将DatePicker屏蔽为MM/dd/yyyy,并且我的用户不想手动键入/字符。他们希望能够只输入数字,并且掩蔽本身就能起作用。。我试过NGX-MASK,虽然它对输入效果很好,但对DatePi
我使用 Angular 6.0.1 。当我需要使用ng-zorro-antd时它向我显示了这个错误: ERROR in multi ../node_modules/ng-zorro-antd/src/
与nz-card的使用有关在 ng-zorro . 我试图在卡片正文中对齐样式化的操作按钮,但没有成功。 我希望卡片的高度相同,因此从视觉上看,所有卡片的底部边框都是垂直对齐的。该按钮位于每张卡片的底
我正在处理与用户相关的信息(创建、删除和编辑),为此我使用了相同的响应式(Reactive)表单组。当前的功能之一是与编辑用户信息有关,一旦用户单击编辑,就会出现一个包含该特定用户的所有信息的模态,除
我做了很多研究,但找不到生成 ng-zorro 主题并在运行时更改它的方法。 最后,我找到了一种方法来做到这一点。 最佳答案 演示: https://ashotaleqs.github.io/ng-z
我做了很多研究,但找不到生成 ng-zorro 主题并在运行时更改它的方法。 最后,我找到了一种方法来做到这一点。 最佳答案 演示: https://ashotaleqs.github.io/ng-z
在我的 Angular 项目中,我想到了一个仪表板,它向我展示了不同的流程循环。根据进度,我想更改线条的颜色。 这是现在的样子。 它应该是这样的。 不幸的是,我无法使用 [nzStrokeColor]
我正在使用 Ng-Zorro 的多重选择,它在抽屉里。打开抽屉时,我给 select 元素一个选项列表和一个已经选择的项目列表。可供选择的选项列表工作正常,但已选择的项目不显示。这也可以在这里看到:S
我目前正在开发一个 Entity Framework 项目,我正在使用 nSwagStudio 链接到服务中创建的模型 所以在客户端,我只导入 nSwag 创建的文件。 在我的 Angular com
我正在使用带有 Angular 7.2.4 的 ng-zorro-antd 7.0.0 rc3。 我的问题是:在移动浏览器上使用 nz-range-picker 时我无法水平滚动,看起来元素对于屏幕来
我想为 cacader 延迟加载数据。但是失败了,因为在加载函数中 this=undefined。该功能定义在组件中,组件中的其他功能运行良好。请帮忙,谢谢。 loadCityBuildingDa
Ant Design 的 NG-ZORRO 如果在核心 app.module 中导入就很简单了 我的用例:我想在 UiLibraryModule 中加载 ngZorro(它设置 Zorro 的提供者并
Ant Design 的 NG-ZORRO 如果在核心 app.module 中导入就很简单了 我的用例:我想在 UiLibraryModule 中加载 ngZorro(它设置 Zorro 的提供者并
我有一个简单的 ngFor,我希望每个条目都有一个带下拉菜单的按钮,每个菜单项应该为 ngFor 中的特定项目调用不同的函数。 下面的代码有效,行为符合我的预期。
如果单独使用,以下代码效果很好, Angular6.0 不允许 [(ngModel)] 与 FormGroup (Reactive Forms)。 As 在 angular 6.0 中已弃用,并将在
我是一名优秀的程序员,十分优秀!