且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以用什么代替& nbsp;& nbsp;在HTML?

更新时间:2022-04-04 17:42:21

(css属性),如下:

Margin and/or Padding. (css properties), like so:

<p style='padding-left : 10px'>Hello</p>

(值得注意的是,通常认为这是一种不好的做法,在外部css文件中声明一个选择器,并设置类/任何适当的。)

(It's worth noting that it's generally considered bad-practice to put an inline style like that; you typically declare a selector in an external css file and set the class/whatever appropriately.)