how to create inline style with :before and :after

前端 未结 5 1003
时光说笑
时光说笑 2021-01-31 01:19

I generated a bubble chat thingy from http://www.ilikepixels.co.uk/drop/bubbler/

In my page I put a number inside of it

.bubble {
  position: relative;
          


        
5条回答
  •  后悔当初
    2021-01-31 01:37

    If you really need it inline, for example because you are loading some user-defined colors dynamically, you can always add a

    ...

    Example use case with PHP and some (wordpress inspired) dummy functions:

    
    
    ...

    Since HTML 5.2 it is valid to place style elements inside the body, although it is still recommend to place style elements in the head.

    Reference: https://www.w3.org/TR/html52/document-metadata.html#the-style-element

提交回复
热议问题