According the "validator w3c", the scrolling attribute on the iframe element is obsolete. It means that for iFrame there is a Scrolling="no" CSS equivalent.
I have tried:
Overflow: hidden;
but without success.
Here an example with:
1)Scrolling=开发者_StackOverflow"no" (it works fine)
but w3c it does complain
2)Scrolling="no" CSS equivalent, (it doesn't work because it shows the scroll)
scroll: 'no'
Is not a valid CSS attribute.
IE is known to have problems with iFrames and the CSS overflow attribute.
- Check out this page for a workaround : http://www.webmasterworld.com/html/3113793.htm
- Or this one : http://www.codingforums.com/showthread.php?t=107457
Really, the best solution here is to use scrolling="no"
inside of your iFrame tag. It's true that it doesn't meet the W3 standards - but no customer is going to run away from your site because it has W3 standards problems. The average person has no idea what a web standard even is, let alone W3.
below javascript worked for me in FF,chrome and IE
var el = document.getElementById("iframeid")
el.scrolling = "no"; //FF & Chrome
el.contentWindow.document.documentElement.style.overflow="hidden"; //IE
精彩评论