Hiding the cursor over iframe
Hiding the user's cursor over iframe:
Method - 1:
Js:
var iframe = document.querySelector('iframe');
var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
iframeDoc.body.style.cursor = 'none';
Method - 2:
<iframe style="pointer-events:none;" src=""></iframe>
Method - 3:
HTML
<div class="wrapper">
<iframe src="foldername/pagename.html"></iframe>
<div class="hide-cursor"></div>
</div>
CSS:
.wrapper {
position: relative;
}
.hide-cursor {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
cursor: none;
z-index: 100;
}
Method - 1:
Js:
var iframe = document.querySelector('iframe');
var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
iframeDoc.body.style.cursor = 'none';
Method - 2:
<iframe style="pointer-events:none;" src=""></iframe>
Method - 3:
HTML
<div class="wrapper">
<iframe src="foldername/pagename.html"></iframe>
<div class="hide-cursor"></div>
</div>
CSS:
.wrapper {
position: relative;
}
.hide-cursor {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
cursor: none;
z-index: 100;
}
Comments
Post a Comment