CSS使用margin-right属性
的 余量右指定元素的右边距。它的长度值可以是%或auto。您可以尝试运行以下代码来设置合适的边距-
示例
<html>
<head>
</head>
<body>
<p style = "margin-right: 10px; border:2px solid red;">
This is a paragraph with a specified right margin
</p>
<p style = "margin-right: 10%; border:2px solid green;">
This is another paragraph with a specified right margin in percent
</p>
</body>
</html>