覆盖不同的图像HTML

时间:2016-09-26 07:31:59

标签: html css image

我正在考虑让三个不同的图像相互重叠,如下所示:

Example

我不太清楚如何做到这一点,所以任何帮助都会受到赞赏!

1 个答案:

答案 0 :(得分:-1)

希望这对你有所帮助。

<!Doctype> 
<html>
 <head>
 <style> 
.front { position:absolute;
 top: 10px;
  left: 10px;
  z-index: 1;
  border:solid;
    border-color:#FFF;
    border-width:10px;
 } .back {
    position: absolute;
    top: 296px;
    left: 511px;
    z-index: 2;
    border:solid;
    border-color:#FFF;
    border-width:10px;
} 
</style>
 </head> 
<body>
<img  src="https://www.daimler.com/bilder/produkte/lkw/mercedes-benz/actros-14c459-w900xh360-cutout.jpg" class="front" >
<img src="http://www.mercedes-benz.de/content/media_library/germany/mpc_germany/de/mercedes-benz_deutschland/lkw_ng/lkw_truck_world/profitraining/truck_fahrerwelt_profitraining20.object-Single-MEDIA.tmp/mb_trucks_profitraining_001_08_KM_Beauty_1.jpg" class="back"> 
</body> 
   </html>
相关问题