带position的Div元素:与其他浏览器一起显示在页面上的不同位置

问题描述

Here是我正在研究的网站。

在第三部分中,您可以看到不同品牌的徽标,我试图将标题文本“ Brands”放置在橙色箭头上方。在台式机上的Chrome上看起来非常完美,但是在所有其他浏览器(包括MOBILE上的Chrome)上,位置都非常差。

我在父div和其他div元素上尝试了“ position:relative”,但似乎没有任何效果。这是我的代码:

  #brands {
        position: relative;
    }

    .container-brand {
        position: relative;
    }

    .arrow-img {
        position: absolute; 
        left: -460px; 
        top: -38px; 
        z-index: 300;
        width: 713px;
    }

    .brand-title {
        position: absolute;
        margin-top: -40px;
        z-index: 400;
        color: #fff;
    }

    .top-row-brands {
        margin-top: 100px;
    }
 <section id="brands">
   <div class="container container-brand">
        <div class="row brands container-brand">
            <div class="arrow col-sm-3 container-brand">
                <img class="arrow-img" src="<?php bloginfo('stylesheet_directory'); ?>/assets/img/arrow.png">
            </div><!--col-->
            <div class="brand-title col-sm-3">
                <h1>Brands</h1>
            </div><!--col-->
        </div><!--row-->
        <div class="row top-row-brands">
            <div class="col-3 col-md-3 col-lg-3 col-brands">
            <img class="img-fluid" src="<?php bloginfo('stylesheet_directory'); ?>/assets/img/brands-01.png">
            </div>
            <div class="col-3 col-md-3 col-lg-3 col-brands">
            <img class="img-fluid" src="<?php bloginfo('stylesheet_directory'); ?>/assets/img/brands-02.png">
            </div>
            <div class="col-3 col-md-3 col-lg-3 col-brands">
            <img class="img-fluid" src="<?php bloginfo('stylesheet_directory'); ?>/assets/img/brands-03.png">
            </div>
            <div class="col-3 col-md-3 col-lg-3 col-brands">
            <img class="img-fluid" src="<?php bloginfo('stylesheet_directory'); ?>/assets/img/brands-04.png">
            </div>
            <div class="col-3 col-md-3 col-lg-3 col-brands">
            <img class="img-fluid" src="<?php bloginfo('stylesheet_directory'); ?>/assets/img/brands-05.png">
            </div>
            <div class="col-3 col-md-3 col-lg-3 col-brands">
            <img class="img-fluid" src="<?php bloginfo('stylesheet_directory'); ?>/assets/img/brands-06.png">
            </div>
            <div class="col-3 col-md-3 col-lg-3 col-brands">
            <img class="img-fluid" src="<?php bloginfo('stylesheet_directory'); ?>/assets/img/brands-07.png">
            </div>
        </div><!--row-->
    </div><!--container-->

    </section>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...