问题描述
我正在尝试将引导栏中的图像向右对齐,并将文本环绕在左侧,如下所示: https://codepen.io/freeCodeCamp/full/YqLyXB
I'm trying to align an image in my bootstrap column to the right and have the text wrap around it on the left like this: https://codepen.io/freeCodeCamp/full/YqLyXB
我整天都在研究Flexbox和垂直对齐方式,而不是忙于做事,觉得是时候问专家了.这是我的样子: https://codepen.io/Seaplush/pen/rKVLmX
I've been researching flexbox and vertical align all day instead of doing my job (woops) and feel like it's time to just ask the experts. Here's what mine looks like:https://codepen.io/Seaplush/pen/rKVLmX
.col2 img{
max-width: 100%;
height: 50%;
float: right;
}
.col2{
background-color: #cccccc;
height: 50vh;
display: flex;
flex-wrap: wrap;
align-items: center;
}
感谢您的帮助,这是我第一次尝试访问网站,如果浏览起来有点麻烦,请对不起;)
Thanks for the help, this is my first website attempt so sorry if it's a bit of a mess to look through ;)
推荐答案
您可以使用引导程序列.只需阅读并了解更多有关Bootstrap网格的信息即可.
You can use the bootstrap columns. Just read and understand a bit more about Bootstrap grid.
请阅读下面的链接:
https://getbootstrap.com/docs/4.0/layout/grid/
https://getbootstrap.com/docs/4.0/layout/overview/
这篇关于尝试将图像对齐到引导程序中列的右中间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!