在很多CSS代码中,都可以看到margin外边距有使用负值的情况,下面就介绍一下他的作用。
代码实例如下:
蚂蚁部落 *{ margin:0px; padding:0px;}#box{ width:300px; height:300px; background-color:red; margin:0px auto;}#top{ width:50px; height:50px; background:blue;}#bottom{ width:50px; height:50px; background:green; margin-top:10px; margin-left:-20px;}
查看更多关于margin外边距负值的作用_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did110469