var x = document.getElementsByTagName("iframe")[0].contentWindow;
//x = window.frames[0];
x.document.getElementsByTagName("body")[0].style.backgroundColor = "blue";
// this would turn the 1st iframe in document blue.
<script>
setInterval(function(){
document.getElementById("iframeId").classList.add('your-class')
},500);
</script>
Now you need to write css code with your class name. Thank you