您现在的位置:首页 >> 前端 >> 内容

相对定位绝对定位两张图片完全重叠的处理方法之背景图

时间:2017/8/3 9:26:23 点击:

  核心提示:相对定位绝对定位两张图片完全重叠的处理方法之背景图#p1{width:200px;height:200px;margin:100px auto;border:1px solid #404040;pos...

相对定位绝对定位两张图片完全重叠的处理方法之背景图

  #p1{
      width:200px;
      height:200px;
      margin:100px auto;
      border:1px solid #404040;
      position:relative;
  }
  #tu1{
      width:200px;
      height:200px;
      background:url("t1.gif");
      position:absolute;
      top:0%;
      left:0%;
  }
  #tu2{
      width:200px;
      height:200px;
      background:url("t2.gif");
      position:absolute;
      top:0%;
      left:0%;
  }
  </style>
</head>
<body>
<p id="p1">
<p id="tu1"></p>
<p id="tu2"></p>
</p>
相对定位绝对定位两张图片完全重叠的处理方法之背景图

作者:网络 来源:dtsxx123的博