Line 15: | Line 15: | ||
#box-shadow-div{ | #box-shadow-div{ | ||
− | |||
width:50px; | width:50px; | ||
+ | |||
+ | position: fixed; | ||
} | } | ||
</style> | </style> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | + | $(document).ready( | |
− | + | function(){ | |
− | + | $("#main").mousemove(function(e){ | |
− | + | $('#box-shadow-div').animate({'top': e.clientY - 20, 'left': e.clientX - 20}, 1); | |
− | + | }); | |
− | + | }); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</script> | </script> | ||
Line 53: | Line 49: | ||
<body> | <body> | ||
− | <div style = "width:1000px; height:1000px;"> | + | <div style = "width:1000px; height:1000px;" id = "main"> |
<img src = "https://static.igem.org/mediawiki/2016/e/ee/T--BostonU--twitterlogo.png" id="box-shadow-div"><br><br><br><br> | <img src = "https://static.igem.org/mediawiki/2016/e/ee/T--BostonU--twitterlogo.png" id="box-shadow-div"><br><br><br><br> | ||
<div id = "test" style = "width:50px; height:50px; background-color:blue;"> | <div id = "test" style = "width:50px; height:50px; background-color:blue;"> |
Revision as of 20:51, 4 August 2016