我有一个简单的 html 页面,但正文太靠近左侧了。我想在左边留一些边距。换句话说,我想将 html 正文向右移动。
html代码如下;
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>head title</title>
</head>
<body>
<h1>Test Page</h1>
<table class="table table-bordered" style="width: auto">
<thead>
</thead>
<tbody>
<tr>
<td>
<strong>Column1</strong>
</td>
<td>Col1 data</td>
</tr>
<tr>
<td>
<strong>Column1</strong>
</td>
<td>Col2 data</td>
</tr>
</tbody>
</table>
<form novalidate="" class="simple-form">PersonID
<input type="text" />
<BR><BR>
name
<input type="text" />
<BR><BR>
<button ng-click="submit()" id="submit_btn">SUBMIT</button>
</form>
<br>
</div>
</body>
</html>
我该怎么做才能将 html 正文稍微向右移动,使其看起来不会太靠近左侧?
最佳答案
在你的头标签之间添加:
<style type="text/css">
<!--
body {
padding: 10px;
}
-->
</style>
这会将 body 标签内的所有内容都推 10px。将其更改为最适合您的内容。 10px 可能不多。
关于html - 如何将此 html 正文向右移动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26395622/