您现在的位置是:亿华云 > 热点
使用Jquery和CSS折叠图像
亿华云2025-10-04 03:56:52【热点】7人已围观
简介如何使用Jquery和CSS进行折叠图像。
Javascript 代码 包含javascipt和HTML代码。云服务器提供商图像 $(“。使用imagebox”)。折叠mouseover(function(){ })。图像mouseout(function { }) - imagebox是使用div标签的类名。 $(“。折叠showlink”)。云南idc服务商图像click(function(){ }) - .showlink是使用show anchor tag的类名。 $(“。折叠hidelink”)。图像click(function(){ }) - .hidelink是隐藏锚标记的类名。站群服务器 使用Jquery CSS函数chaning max-height:100px
<script type=" text/javascript " src=" http://ajax.googleapis.com/ ajax/libs/jquery/1.4.2/jquery.min.js " > </script> <script type=" text/javascript " > $(document).ready( function()
{
// Image Area Mouseover and Mouseout
$(".imagebox"). mouseover ( function()
{
$(".showhide").show();
}). mouseout ( function()
{
$(".showhide").hide();
});
//Show link
$(".showlink").click(function()
{
$(".imagebox").css(max-height,);
$(".showlink").hide();
$(".hidelink").show();
});
//Hide link
$(".hidelink").click(function()
{
$(".imagebox").css(max-height,100px);
$(".hidelink").hide();
$(".showlink").show();
});
});
</script>//HTML code
show
hide
</div>CSS 代码
.imagebox{
display:block;
position:relative;
overflow:hidden
}
.hidelink{
display:none;
}
.showhide{
padding:5px;
border-top:dashed 1px #333;
border-bottom:dashed 1px #333;
background:#F2f2f2 none repeat scroll 0 0;
bottom:0;
cursor:pointer;
display:block;
height:18px;
left:0;
line-height:18px;
padding-left:5px;
position:absolute;
width:100%;
}很赞哦!(54928)
相关文章
- 公司名字不但要与其经营理念、活动识别相统一,还要能反映公司理念,服务宗旨、商品形象,从而才能使人看到或听到公司的名称就能产生愉快的联想,对商店产生好感。这样有助于公司树立良好的形象。
- MySQL 数据库备份种类以及常用备份工具汇总
- Java底层知识:什么是 “桥接方法” ?
- 致力推广Vim的那个程序员走了,Vim之父:我要把9.0版献给他
- 3、不明先知,根据相关征兆预测可能发生的事件,以便提前做好准备,赶紧注册相关域名。;不差钱域名;buchaqian抢先注册,就是这种敏感类型。预言是最敏感的状态。其次,你应该有眼力。所谓眼力,就是善于从社会上时不时出现的各种热点事件中获取与事件相关的域名资源。眼力的前提是对域名领域的熟悉和丰富的知识。
- SSIS通过环境变量配置数据源连接参数
- 大数据项目实践:基于hadoop+spark+mongodb+mysql+c#开发医院临床知识库系统
- 详解Java Stream的分组和聚合
- 2016年1月1日:注册价格将降至每年7欧元。
- 推荐两个基于 SpringBoot 的工作流项目,很有用!