Wrapping text around an image with indentation and justify

后端 未结 2 1641
春和景丽
春和景丽 2020-12-08 20:40

I want to make something like this.

The problem is that I need the p to have an indentation and justify as alignment.

I could float the image to

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 21:04

    img {
        float: left;
        margin: 0 20px 20px 0;
    }
    
    p {
        text-align: justify;
        text-indent: 2em;
    }
    

    Here's the fiddle: http://jsfiddle.net/9VkQR/

提交回复
热议问题