What is the best way to indent text in a DIV when it wraps?

前端 未结 5 906
隐瞒了意图╮
隐瞒了意图╮ 2021-02-02 08:04

So I have a DIV that contains some dynamic text. Let\'s say I know the text and font-size but I don\'t know the size of the DIV. I\'d like the display of the text in the DIV t

5条回答
  •  醉话见心
    2021-02-02 08:52

    W3C says you just have to use text-indent property.

    source

    .indentedtext
    {
        text-align:start;
        text-indent:5em;
    }
    

提交回复
热议问题