I have a question about border radius. Basically I am using code to create a sort of spotlight tool to find hidden html. Here is the fiddle: http://jsfiddle.net/pwneth/hj57k/1899/
css:
#tail {
border: 1000px solid #fff;
position: absolute;
float: left;
height: 100px;
width: 100px;
background-color: rgba(0,0,0,.0);
z-index: 100;
top: 0px;
left: 0px;
pointer-events:none;
-moz-box-shadow: inset 0 0 20px #000000;
-webkit-box-shadow: inset 0 0 20px #000000;
box-shadow: inset 0 0 20px #000000;
}
I need to somehow set the border radius of the shape to make it appear as a circle. This is a problem however because this only effects the outside border, which is not something I want to effect. Just the inside of the border.
Here's a simpler option:
Fiddle
Just put the border-radius on the original element.
#tail
{
/* ... */
border-radius:100%;
}
Then just hide everything until the mouse has been over it.
body /* or whatever element you want */
{
display:none;
}
Then do this:
$(document).bind('mouseenter', function (e) {
$('body').show();
});
$('body').bind('mouseleave', function (e) {
$(this).hide();
});
This way users will never see the hidden content.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With