只是用js+css+div,不要用<iframe>标签来完成以下这种效果,点击一下小箭头,可以将左边的div隐藏起来。
2个回答
展开全部
是这种效果么?
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#apDiv1 {
position:absolute;
left:42px;
top:37px;
width:109px;
height:370px;
z-index:1;
background-color:#F00;
display:block;
}
#apDiv2 {
position:absolute;
left:135px;
top:37px;
width:17px;
height:370px;
z-index:2;
background-color:#000;
color:#FFF;
}
</style>
</head>
<script>
function cc()
{
var t=document.getElementById("apDiv1");
if(t.style.display=="none")
{
t.style.display="block"
}
else
{
t.style.display="none" ;
}
}
</script>
<body>
<div id="apDiv1"></div>
<div id="apDiv2" onclick="cc()">
<p>请</p>
<p>点</p>
<p>击</p>
</div>
</body>
</html>
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#apDiv1 {
position:absolute;
left:42px;
top:37px;
width:109px;
height:370px;
z-index:1;
background-color:#F00;
display:block;
}
#apDiv2 {
position:absolute;
left:135px;
top:37px;
width:17px;
height:370px;
z-index:2;
background-color:#000;
color:#FFF;
}
</style>
</head>
<script>
function cc()
{
var t=document.getElementById("apDiv1");
if(t.style.display=="none")
{
t.style.display="block"
}
else
{
t.style.display="none" ;
}
}
</script>
<body>
<div id="apDiv1"></div>
<div id="apDiv2" onclick="cc()">
<p>请</p>
<p>点</p>
<p>击</p>
</div>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询