CSS margin-right

上一页 下一页

示例中展现不同的margin-right属性值.

选择不同的值查看对应结果:

margin-right: 0;
margin-right: 10px;
margin-right: 25px;
margin-right: -25px;
margin-right: 100px;
margin-right: 10%;
margin-right: auto;
See this blue div element with different margin-left values.
We inserted a red div here, to see the right margins of the blue div.
See this blue div element with different margin-left values.
We inserted a red div here, to see the right margins of the blue div.
See this blue div element with different margin-left values.
We inserted a red div here, to see the right margins of the blue div.
See this blue div element with different margin-left values.
We inserted a red div here, to see the right margins of the blue div.
See this blue div element with different margin-left values.
We inserted a red div here, to see the right margins of the blue div.
See this blue div element with different margin-left values.
We inserted a red div here, to see the right margins of the blue div.
See this blue div element with different margin-left values.
We inserted a red div here, to see the right margins of the blue div.

要使用更多方法,请在编辑器中试一下: 亲自试一试 ❯