新闻详情

margin设置为负数

2072 2009/3/26
<html>
<head>
<title>margin设置为负数</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;   /* 设置为负数 */
 background-color:#eeb0b0;
}
-->
</style>
   </head>
<body>
 <span class="left">行内元素1</span><span class="right">行内元素2</span>
</body>
</html>

相关资讯

18973218026
返回顶部