How to automatically set the width of an HTML element to the width of the enclosed text

前端 未结 0 536
误落风尘
误落风尘 2020-11-30 03:57

Here is an example:

I would like for the width of the h1 or a surrounding div to "clip" the text so that I can, for example, draw a border around on

相关标签:
回答
  • 消灭零回复
提交回复
热议问题