Difference between revisions of "Template:Pitt"
Line 256: | Line 256: | ||
</div>\ | </div>\ | ||
"); | "); | ||
+ | |||
+ | |||
+ | $("#bannerContainer").mousemove(function(event){ | ||
+ | |||
+ | var c = document.getElementById("bannerCanvas"); | ||
+ | var ctx = c.getContext("2d"); | ||
+ | |||
+ | // Create gradient | ||
+ | var radius = 50; | ||
+ | radius = radius * 0.90; | ||
+ | var grd = ctx.createRadialGradient(radius,radius,1,radius,radius,radius); | ||
+ | grd.addColorStop(0,"red"); | ||
+ | grd.addColorStop(1,"white"); | ||
+ | |||
+ | // Fill with gradient | ||
+ | ctx.fillStyle = grd; | ||
+ | |||
+ | ctx.arc(radius, radius, radius, 0 , 2*Math.PI); | ||
+ | ctx.fill(); | ||
+ | |||
+ | }); | ||
}); | }); | ||
Line 371: | Line 392: | ||
font-weight: bold; | font-weight: bold; | ||
font-family: "Trebuchet MS", Helvetica, sans-serif; | font-family: "Trebuchet MS", Helvetica, sans-serif; | ||
+ | } | ||
+ | |||
+ | #bannerContainer canvas { | ||
+ | height:100%; | ||
+ | width:100%; | ||
} | } | ||
Line 419: | Line 445: | ||
display: none; | display: none; | ||
opacity: 0.8; | opacity: 0.8; | ||
+ | } | ||
+ | |||
+ | #bannerCanvas { | ||
+ | position: absolute; | ||
+ | width: 100%; | ||
+ | z-index:-1; | ||
} | } | ||
Line 444: | Line 476: | ||
</style> | </style> | ||
+ | |||
+ | <canvas id="bannerCanvas"></canvas> | ||
<div id="bannerContainer"> | <div id="bannerContainer"> |
Revision as of 08:40, 29 May 2015