站内搜索:
首页 >> 前端 >> 内容
相对定位绝对定位两张图片完全重叠的处理方法之背景图

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

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

  #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>
相对定位绝对定位两张图片完全重叠的处理方法之背景图

  • 上一篇:前端性能优化方法
  • 下一篇:微信小程序之自定义toast实例
  • 返回顶部