made_in_China486 2021-09-30 01:31 采纳率: 75%
浏览 21
已结题

那个图一我的那个logo前面的分割线为什么显示不了,我图二是把top取消了才看见的?

img

img


  <style>
        .footer-end{
            background: #3c3d41;
            padding: 30px 0;
        }
        .footer-end .container{
            padding-left: 15px;
            padding-right: 15px;
            margin-right: auto;
            margin-left: auto;
            width: 1170px;
        }
        .foot-logo{
            width: 100%;
            display: table;
            text-align: center;
        }
        .foot-logo a:before{
            content:'';
            position: absolute;
            top: 50%;
            left: 0;
            width: 44%;
            height: 1px;
            background:#545556;
        }
        .foot-logo a:after{
            content:'';
            position: absolute;
            top: 50%;
            right: 0;
            width: 44%;
            height: 1px;
            background:#545556;
        }
        .foot-logo a{
            display: table-cell;
            color: orange;
            font-family: 'Ubuntu Condensed', sans-serif;
            font-size: 40px;
            text-decoration: none;
        }
        .foot-logo a span{
            color: #01a185;
        }
    </style>
```html
 <div class="footer-end">
        <div class="container">
            <div class="foot-logo">
                <a href="home_copy.html">Re<span>sale</span></a>
            </div>
            <div class="foot-social-icons"></div>
            <div class="copy"></div>
        </div>
    </div>


  • 写回答

1条回答 默认 最新

  • 前端不释卷leo 前端领域新星创作者 2021-09-30 06:59
    关注

    原因如下,
    你的那条线是用伪元素表示,设置为绝对定位,这个时候相对于html来进行定位,有可能被那个图片的块给盖住了。
    解决:
    第一,给伪元素加层级z-index:999,让其显示在最上层
    第二,给.foot-logo设置相对定位position:relative,使得伪元素相对于foot-logo块来定位,就不会被logo给盖住了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 10月22日
  • 已采纳回答 10月14日
  • 创建了问题 9月30日

悬赏问题

  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写
  • ¥20 Qcustomplot缩小曲线形状问题
  • ¥15 企业资源规划ERP沙盘模拟