日期:2014-05-17  浏览次数:20633 次

怎样更改有透明iframe做背景的字体样式,使其不受底层颜色影响?求大神指教!!
<li><a  class=products_jp>机旁物资管理</a></li><div class=sub  ><iframe id='aaaa'   style='background-color:transparent;position: absolute;filter:alpha(opacity=0);  z-index: -1; width: 4000px;  height: 4000px; top: 0; left: 0;' frameborder='0'><body style='background-color:transparent;width: 4000px;  height: 4000px; top: 0; left: 0'></body></iframe><ul><li><h2><a>厂矿机旁备件管理</a></h2></li><li><a href=../../systemmodule/machine_store/selectreturn.aspx target=main_right>驳回领料单处理</a><a href=../../systemmodule/machine_store/MachineInventorySelectCK.aspx target=main_right>厂矿库存查询</a><a href=../../systemmodule/workorder/WorkorderEdit.aspx target=main_right>维修工单编制</a></li><ul><li><h2><a>地区机旁备件管理</a></h2></li><li><a href=../../systemmodule/machine_store/MachineInventorySelectGCL.aspx target=main_right>地区库存查询</a></li><ul><li><h2><a>机旁物资操作</a></h2></li><li><a href=../../systemmodule/machine_store/MachineIntoReturn.aspx?id=9 target=main_right>机旁退库</a><a href=../../systemmodule/machine_store/MachineDrawEdit.aspx target=main_right>机旁物资出库</a><a href=../../systemmodule/workorder/Workorderlist.aspx target=main_right>维修工单追加领料</a></li><ul><li><h2><a>机旁物资查询</a></h2></li><li><a href=../../systemmodule/workorder/WorkOrderSelect.aspx target=main_right>工单查询</a><a href=../../systemmodule/machine_store/MachineOutSelect.aspx target=main_right>机旁出库查询</a><a href=../../systemmodule/machine_store/MachineInventorySelectNow.aspx target=main_right>机旁库存查询</a></li></ul></div>


动态生成后的页面是这样的,菜单样式如下:
ul#topnav .sub ul li a 
{
    
float: none; 
text-indent: 0; /*--Reset text indent--*/
height: auto;
background: url(../../Images/menulist/navlist_arrow.png) no-repeat 5px 12px;
padding: 7px 5px 7px 15px;
display: block;
text-decoration:none;
color: #fff;
}
我的字体是透明的,背景的iframe也是透明的,所以受到底层元素的影响。现在想要更改字体颜色,使其不受底层元素的影响,但是更改颜色没有效果。自己测试了一下,是因为底层iframe的影响。求教,怎么在不更改iframe的前提下,能更改字体颜色?

------解决方案--------------------
如果有个 演示的地址也许能帮上你,你贴的代码不能实现你说的情况下发生的问题。