发布网友 发布时间:2024-10-23 22:37
共3个回答
热心网友 时间:2024-10-30 20:47
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default8.aspx.cs" Inherits="Default8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>多模块等高</title>
<style type="text/css">
* { margin: 0; padding: 0; }
body { font: 12px/1.6em 宋体 sans-serif; }
.box { margin: 0 auto; width: 950px; overflow: hidden; }
.left { float: left; width: 300px; overflow: hidden; }
.center { float: left; width: 300px; margin-left: 10px; overflow: hidden; }
.right { float: right; width: 330px; overflow: hidden; }
.equal {padding-bottom: 9999px; margin-bottom: -9999px;}
.tap { border: solid 1px #F00; margin-top: 10px; }
.border_top { height: 1px; background: #F00; overflow: hidden; }
</style>
</head>
<body>
<div class="box">
<div class="left equal">
<div class="tap">fdsfs</div>
<div class="tap">fdsfs</div>
<div class="equal tap">fdsfs<br />dsasdfdsfs<br />dsasd<br />dsasd<br />dsasd</div>
</div>
<div class="center equal">
<div class="tap">fsddf</div>
<div class="equal tap">fsddf</div>
</div>
<div class="right equal">
<div class="equal tap">其实现的原理为,正内边距占位,负外边距保持其大小,再由父元素溢出隐藏来实现,而当多模块时,只需在每列最后加上正负补丁,就可以实现</div>
</div>
</div>
<div class="box"><div class="left border_top"></div><div class="center border_top"></div><div class="right border_top"></div></div>
</body>
</html>
热心网友 时间:2024-10-30 20:46
js控制iframe
热心网友 时间:2024-10-30 20:48
比如:
在button点击的事件中:(假设你的iframe ID为:test)
var i=0;
function button_click()
{
if(i==0)
{
document.getElementById('test').src='a.aspx';//第一次载入
i++;
}
else
{
document.getElementById('test').src='b.aspx';//第二次载入
}
}