Ant Design Vue 中使用 Flexbox 布局将 span 元素对齐到 a-col 底部
要使 `` 元素整个处于 `
以下是实现这个效果的示例代码:
<template>
<a-row :gutter="8">
<a-col :span="10" class="col-wrapper">
<span style="color: blue" class="bottom-span">
处方明细: 共{{ cfMx.length }}条,处方总金额{{ cfTotal }}元
</span>
</a-col>
</a-row>
</template>
<style scoped>
.col-wrapper {
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.bottom-span {
align-self: flex-end;
}
</style>
在上面的代码中,我们为 `
这样 `` 元素就会整个处于 `
原文地址: https://www.cveoy.top/t/topic/qyEV 著作权归作者所有。请勿转载和采集!