[英]Styling error messages with html/css/flexbox
I know I should say 'show what you've tried' but I'm keen to see how other people would solve this.我知道我应该说“展示你已经尝试过的东西”,但我很想知道其他人会如何解决这个问题。
The solution I've given below is über basic (it doesn't take care of long string values if they overflow; it could be better and update flex-direction
to column
for .row
using a media query for small viewports).我在下面给出的解决方案是超级基本的(如果它们溢出,它不会处理长字符串值;它可能会更好,并使用小视口的媒体查询将flex-direction
更新为.row
column
)。
Just as an aside, I'd highly recommend using the fxLayout library with Angular.顺便说一句,我强烈建议在 Angular 中使用fxLayout库。
<div>
<div class="row">
<div class="cell">content 01</div>
<div class="cell">content 02</div>
</div>
<div class="row">
<div class="cell">content 03</div>
<div class="cell">content 04</div>
</div>
</div>
div.row {
display: flex;
flex-direction: row;
}
div.cell {
display: flex;
width: 50%;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.