This question already has answers here:
Responsive image align center bootstrap 3
                                
                                    (16个答案)
                                
                        
                                2年前关闭。
            
                    
Hullo,我的网站底部有一个小“ facebook,instagram,twitter”图标。我无法使图像居中吗?请帮助!

HTML:

<div class="container-fluid2"><img src="../Website Pic/Capture.PNG"
alt="Placeholder image" width="90" class="img-responsive-icon"><img
src="../Website Pic/Capt1ure.PNG" alt="Placeholder image" width="85"
class="img-responsive-icon"><img src="../Website Pic/f.PNG" alt="Placeholder
image" width="72" class="img-responsive-icon"></div>


CSS:

.img-responsive-icon {
display: inline-block;
padding-left: 10px;
padding-right: 10px;
float: none;
padding-bottom: 5px;
padding-top: 25px;
max-height: none;

最佳答案

引导程序方法是添加“文本中心”类。

<div class="container-fluid2 text-center"></div>

08-17 06:54