1)
我甚至无法通过在url末尾添加?isdlg=1(即..allitems.aspx?isdlg=1)使其在正常页面上工作
2)
<div class="ms-dlgFrameContainer">
<iframe width="1400" height="600" id="DlgFramee" class="ms-dlgFrame" frameborder="0" src="myurl.aspx">
<html class="ms-dialog">
<head>
<style type="text/css">
.ms-dialog #titleAreaBox { display:none }
</style>`
3)
在iframe中隐藏页面标题。
<script type="text/javascript">
document.getElementById("myiframe1").contentWindow.document.getElementById("titlerow").style.display = "none"; </script>`
4)
最有希望的。当我加上
<iframe id="myiframe1" src="myurl" width="1000" height="450" frameborder="1"></iframe>
<style>
#titleAreaBox { display: none }
</style>
在与iframe相同的CEWP中,它删除当前页面的标题区域,而不是iframe中的页面。这正是我想要的,除了我希望它对iframe内的页面执行此操作。
5)
我也这样做了,甚至只是试图改变标题颜色,但没有注意到任何变化。我查找了正确的Web部件ID。
<style type="text/css">
#MSOZoneCell_WebPartWPQ2 .ms-WPHeader
{ background-color: pink; }
</style>