求一个类似于jquery的slideup,slidedown效果 点击这里进去看效果这个网站右边的4个小图的那种效果。他们是用jquery实现的,现在我想用js实现,求高人指点。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 顺便把我写的贴出来,我的实现不了。<!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=gb2312" /><title>无标题文档</title><style>body{ margin:0px;}div.content{ width:300px; height:auto;}.imgcontent{ width:300px; height:200px;}div.slide{ background-color:black; filter:alpha(opacity=75); opacity:.75; width:300px; height:30px; z-index:99; position:absolute; top:170px; left:0px; color:white;}div.slideUp{ background-color:black; filter:alpha(opacity=75); opacity:.75; width:300px; height:30px; z-index:99; position:absolute; top:0px; left:0px; color:white;}div.chislide{ width:300px; height:170px; z-index:99; position:absolute; top:30px; left:0px; display:none;}div.chislideUp{ width:300px; height:169px; z-index:99; position:absolute; border-top:#CCFF66 solid 1px; top:30px; left:0px; background-color:black; opacity:.75; filter:alpha(opacity=75);}</style><script> <!-- function mouseover() { document.getElementById('slide').style.className='slideUp'; document.getElementById('chislide').style.className='chislideUp'; } function mouseout() { document.getElementById('slide').style.className='slide'; document.getElementById('chislide').style.className='chislide'; } --></script></head><body><div class="content"> <div class="imgcontent" id="imgcontent" onmouseover="mouseover()" onmouseout="mouseout()"> <img src="1.jpg" border="0" class="imgcontent" /> <div class="slide" id="slide">测试一下效果</div> <div class="chislide" id="chislide"></div> </div> <div><img src="2.jpg" border="0" class="imgcontent" /></div> <div><img src="3.jpg" border="0" class="imgcontent" /></div> <div><img src="4.jpg" border="0" class="imgcontent" /></div></div></body></html> 动画的话肯定要用到setTimeout()。 html一个简单的问题 多级连动数据量过大打开速度太慢,如何解决? JS如何判断单个复选框是否选中 鼠标拖动层或者其他! 兄弟们,关于引号的问题,折磨死了,高手请进. 请教如何设一个td中的背景图片的大小 日期变量的格式转换问题,十万火急!!!! 求大神看看,jQuery图片自动滚动 我想编写个函数,可是不知道该如何下手,请指教???? 这段程序错哪儿哪 关于javascript接收数组问题 闲暇时用JQuery写了个窗口桌面,希望各位大虾多提提意见
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
body
{
margin:0px;
}
div.content
{
width:300px;
height:auto;
}
.imgcontent
{
width:300px;
height:200px;
}
div.slide
{
background-color:black;
filter:alpha(opacity=75);
opacity:.75;
width:300px;
height:30px;
z-index:99;
position:absolute;
top:170px;
left:0px;
color:white;
}
div.slideUp
{
background-color:black;
filter:alpha(opacity=75);
opacity:.75;
width:300px;
height:30px;
z-index:99;
position:absolute;
top:0px;
left:0px;
color:white;
}
div.chislide
{
width:300px;
height:170px;
z-index:99;
position:absolute;
top:30px;
left:0px;
display:none;
}
div.chislideUp
{
width:300px;
height:169px;
z-index:99;
position:absolute;
border-top:#CCFF66 solid 1px;
top:30px;
left:0px;
background-color:black;
opacity:.75;
filter:alpha(opacity=75);
}
</style>
<script>
<!--
function mouseover()
{
document.getElementById('slide').style.className='slideUp';
document.getElementById('chislide').style.className='chislideUp';
}
function mouseout()
{
document.getElementById('slide').style.className='slide';
document.getElementById('chislide').style.className='chislide';
}
-->
</script>
</head><body>
<div class="content">
<div class="imgcontent" id="imgcontent" onmouseover="mouseover()" onmouseout="mouseout()">
<img src="1.jpg" border="0" class="imgcontent" />
<div class="slide" id="slide">测试一下效果</div>
<div class="chislide" id="chislide"></div>
</div>
<div><img src="2.jpg" border="0" class="imgcontent" /></div>
<div><img src="3.jpg" border="0" class="imgcontent" /></div>
<div><img src="4.jpg" border="0" class="imgcontent" /></div>
</div>
</body>
</html>