Absolute element inheriting relative parent div's width

后端 未结 1 1139
一个人的身影
一个人的身影 2021-02-18 23:17

I am trying to position a gradient over an inline / inline-block anchor link, and have that gradient inherit the width of that parent anchor. The problem is that the span either

1条回答
  •  庸人自扰
    2021-02-18 23:54

    Can't be done with position: absolute as far as I can see.

    I'm not sure whether this will serve you, but how about giving the a position: relative and the a span

    left: 0px;
    right: 0px;
    top: 0px;
    bottom: 0px;
    

    ?

    0 讨论(0)
提交回复
热议问题