How to wrap text around floating, fixed image?

后端 未结 3 1150
无人共我
无人共我 2021-01-22 16:52

I\'ve got an image that floats in the bottom right corner (to put in the button, the position has to be fixed). However, part of the text on my page disappears behind the image.

3条回答
  •  旧时难觅i
    2021-01-22 17:36

    No, not in CSS alone.

    The fact that the image is floated doesn't help here, because it is also fixed. Therefor it is not part of the flow anymore and the text doesn't respond to it.

    This cannot be fixed by CSS alone. You could fix it using Javascript by moving the image around as you scroll, but it will be hard to get right and it will seriously slow down scrolling through your page, since the text will have to be re-aligned after each movement.

    I think you'd better look out for a different solution.

提交回复
热议问题