我有一段文字。我想在左侧设置 20% 的边距,在右侧设置 30% 的边距。如何使用 CSS 实现这一点?
下面是我的代码:
.style4 {
float: left;
margin-left: 20%;
background-color: #e5e0dd;
width: 68.1%;
margin-right: 30%;
border-left:30%;
text-align: center;
font-family: Calibri;
font-size: small;
}
<div class="style4">
This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.This is a test.
</div>