如何通过设置CSS使文字与页面最左端留有一些距离?

html-css016

如何通过设置CSS使文字与页面最左端留有一些距离?,第1张

假设文字在p里

<p style="margin-left:**px">文字</p>

**为数字,设置的越大 离左边越远

当然设置padding-left也是可以的。不过这涉及到box model问题了。...

1.新建一个txt文件,把扩展名改为css,即 文件名.css

2.在里面写入

#你的DIV名字

{

position:absolute这是绝对定位

margin-left:100px距左多少

margin-top:200px距上多少

margin-bottom:300px距底部多少

margin-right:400px距右多少

}