1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
.box, .box3, .box2{
position:absolute;
background-color:gray;
height:200px;width:250px;
margin-top:100px;
border:1px ridge #aaa;
-moz-box-shadow: 10px 10px 10px #212121;
-webkit-box-shadow: 10px 10px 10px #212121;
box-shadow: 10px 10px 10px #616161;
}
.box2{
left:150px;
}
.box3{
left:300px;
}
</style>
<script type="text/javascript">
function premierplan(obj)
{
var lanodeclone=obj.cloneNode(true);
obj.parentNode.appendChild(lanodeclone)
obj.parentNode.removeChild(obj);
}
</script>
</head>
<body>
<div id="conteneur">
<div class="box" onclick="premierplan(this)">1</div>
<div class="box2" onclick="premierplan(this)">2</div>
<div class="box3" onclick="premierplan(this)">3</div>
</div>
</body>
</html> |
Partager