当前位置: 移动技术网 > IT编程>网页制作>CSS > 让网页框架透明 底部对齐的代码

让网页框架透明 底部对齐的代码

2017年12月08日  | 移动技术网IT编程  | 我要评论

返100,七夕网页,17kkmh

让网页框架透明
ie5.5和nn6以上的浏览器支持frame,iframe对象的allowtransparency方法,如果某对象的背景颜色设置为transparency的,它将继承包含它容器的特性。我们可以通过这个特性实现透明背景的开/关。 
代码如下: 
a.html如下: 
<html><head><title></title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
</head>
<body style="background-color: transparent">
<h1>透明文档</h1>
<p>此iframe无背景颜色</p>
<p>body:<br><body style="background-color:transparent"></p></body></html> 

iframe
<iframe id="frame1" src="a.html" allowtransparency="true" height=180 width=300> </iframe>


底部对齐的代码:

<style type="text/css">
.box1 {border:1px #cccccc solid;  width:500px; height:600px;position:relative;}
.box2 {border-top:1px #cccccc solid; background:#f2f6fb; width:498px; height:22px; position:absolute; bottom:0;}
</style>
<div class="box1">
    <div class="box2"></div>
</div>

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网