我在其中的 html 页面上调用 iframe 我有网站 url,我想更改 Logo 位置 我想在其中添加填充。所以我从网站 css 复制了相同的类,并在我的 html 页面上应用了 !important 但它不起作用。
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/*website class( just for example)
#header_logo {
padding: 29px 0 18px 8px;
}*/
// my class
#header_logo {
padding: 29px 0 18px 50px!important;
}
</style>
</head>
<body>
<iframe width="100%" height="600" allowtransparency="yes" frameborder="0" src="http://airtel.in">
</iframe>
</body>
</html>
最佳答案
阿米特
使用 javascript/jquery,您可以更改 ID 或类(或添加类)..
要在 iframe 中查找内容,您可以执行以下操作:
$("iframe").contents().find('#selector')
关于html - 我们可以更改 iframe src 页面上的类吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9785627/