So I've been doing my portfolio and right now I'm doing the skills section which consists of a 6 image grid of each skill logo. For this I'm using Boostrap and I'm having a problem with the second row. It just clusters in the middle different from the first row. I'm linking my CodePen in case somebody can help me identify my problem.. (the idea of the CodePen is just watching the code as you guys can't see the images in there).
https://codepen.io/norwyx/pen/yLozjLg
Here's the HTML of the section that is not working:
<div class="row d-flex justify-content-center align-items-center" id="skills__first-row">
<div class="col-md-4 skills__item">
<img src="./images/html5-logo.png" alt="HTML5 logo" class="img-fluid" id="html__logo">
</div>
<div class="col-md-4 skills__item">
<img src="./images/css3-logo.png" alt="CSS3 logo" class="img-fluid" id="css__logo">
</div>
<div class="col-md-4 skills__item">
<img src="./images/js-logo.png" alt="JavaScript logo" class="img-fluid" id="js__logo">
</div>
<!-- Second Row -->
<div class="row d-flex justify-content-center align-items-center" id="skills__first-row">
<div class="col-md-4 skills__item">
<img src="./images/html5-logo.png" alt="HTML5 logo" class="img-fluid" id="html__logo">
</div>
<div class="col-md-4 skills__item">
<img src="./images/css3-logo.png" alt="CSS3 logo" class="img-fluid" id="css__logo">
</div>
<div class="col-md-4 skills__item">
<img src="./images/js-logo.png" alt="JavaScript logo" class="img-fluid" id="js__logo">
</div>
首先从row中移除d-flex
类,bootstrap 4和5,row已经有弹性了,第二件事是,如果你想让你的图像在div
text-center
在每列上添加text-center
类,您的问题将得到解决
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.