Noe sånt feks i jQuery:
Kode
<html>
<head>
<style type="text/css">
body {background-color: #442266;}
.box{background-color:#224466;left:0;right:0;bottom:0;margin:auto;position:absolute;top:0;height:500px;width:500px;color:#ffffff;}
</style>
</head>
<script type="text/javascript">
/*HUSK Å IMPORTERE JQUERY BIBLIOTEKET*/
$(document).ready(function(){
$("#box").hover(function() {
$(this).css('box-shadow','10px 10px 5px #888888');
}, function() {
$(this).css('box-shadow','0px 0px 0px #ffffff');
});
});
</script>
<body>
<div id="box" class="box">
</div>
</body>
</html>
Sist endret av moret; 3. februar 2014 kl. 20:32.