我正在尝试为iframe内的内容应用CSS样式,请查看此链接http://jsfiddle.net/pPqGe/
jQuery:
$(document).ready(function() {
$('iframe').contents().find('h1').css('color','red');
});
HTML:
<iframe src="mysite" width="100%" height="100%" id="myframe"></iframe>
我使用了一个实时网站作为iframe的源。