margin設(shè)置為負(fù)數(shù)
文章導(dǎo)讀:
<html>
<head>
<title>margin設(shè)置為負(fù)數(shù)</title>
<style type="text/css">
<!--
span{
text-align:center;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
padding:10px;
border:1px dashed #000000;
}
span.left{
margin-right:30px;
background-color:#a9d6ff;
}
span.right{
margin-left:-53px; /* 設(shè)置為負(fù)數(shù) */
background-color:#eeb0b0;
}
-->
</style>
</head>
<body>
<span class="left">行內(nèi)元素1</span><span class="right">行內(nèi)元素2</span>
</body>
</html>