Add stroke around text - on the outside - with css?

后端 未结 9 1425
走了就别回头了
走了就别回头了 2021-01-03 21:48

I have the following HTML and CSS:

9条回答
  •  借酒劲吻你
    2021-01-03 22:27

    i know this is an old question but have a look at this:

    https://jsfiddle.net/1dbta9cq/

    you can simply place another text on top of the stroked text with absolute positioning, it's not so tidy but it solves the problem

    Stroke

    Stroke

    .container{ width:300px; } .stroke{ position:absolute; -webkit-text-stroke: 10px black; } .no-stroke{ color:white; position:absolute }

提交回复
热议问题