what does ::before really do?

前端 未结 3 400
忘掉有多难
忘掉有多难 2020-12-29 21:11

So I read the docs and probably understand the purpose of ::before and ::after. If my understanding is correct, they should always work in combinat

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-29 21:48

    ::before and ::after are pseudo elements as you can see on this example:

    CSS:

    .container-fluid>p::before{
        content: "HI";
    }
    .container-fluid>p::after{
        content: "Bee";
    }
    

    http://jsfiddle.net/vX2jW/ You can read more here: http://css-tricks.com/almanac/selectors/a/after-and-before/

提交回复
热议问题