【技术】点击“更多”后 显示/隐藏
2015-04-10 15:37
253 查看
效果图一:
效果图二:
点击“更多”后隐藏
<div class="more-wrap">
<p class="more">点击此处更多</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<div class="hidden">
<p>内容内容内容内容内容</p>
</div>
</div>
.more-wrap{
position: relative;
}
.more{
color: #0E8BDB;
font-size: 16px;
font-weight: bold;
cursor: pointer;
}
.hidden{
position: absolute;
display: none;
border: #FFB554 1px solid;
width: 150px;
height: 50px;
line-height: 50px;
background-color: #FCF4AC;
text-align: center;
left: 20px;
top: 34px;
}
$(document).ready(function(){
$(".more").click(function(){
$(".hidden").toggle(1000);
});
});
效果图二:
点击“更多”后隐藏
<div class="more-wrap">
<p class="more">点击此处更多</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<p>内容在该层上面</p>
<div class="hidden">
<p>内容内容内容内容内容</p>
</div>
</div>
.more-wrap{
position: relative;
}
.more{
color: #0E8BDB;
font-size: 16px;
font-weight: bold;
cursor: pointer;
}
.hidden{
position: absolute;
display: none;
border: #FFB554 1px solid;
width: 150px;
height: 50px;
line-height: 50px;
background-color: #FCF4AC;
text-align: center;
left: 20px;
top: 34px;
}
$(document).ready(function(){
$(".more").click(function(){
$(".hidden").toggle(1000);
});
});
相关文章推荐
- 一些简单的js技术 实现点击 的js隐藏显示
- js实现的点击超链显示隐藏层
- 点击显示或隐藏某部分内容
- 点击显示隐藏菜单,动画效果,半透明,支持所有浏览器
- 【原创】无限分级Repeater递归实现:读取一次数据库,使用LINQ2SQL技术,支持排序&显示隐藏
- javascript 点击固定数据 隐藏或显示DIV
- js点击显示隐藏表格
- Jquery 点击按钮显示和隐藏层
- 点击显示隐藏菜单,动画效果,半透明,支持所有浏览器
- JavaScript实践:点击CheckBox显示/隐藏Details
- 去掉button按钮左右两边的留白 设置按钮背景为透明 去掉鼠标点击时出现的虚线边框 层的显示与隐藏
- 简单的点击显示、隐藏效果
- 默认隐藏内容,点击标题显示内容。
- 一个简单的点击后显示与隐藏表格的例子
- 点击显示隐藏菜单,动画效果,半透明,支持所有浏览器
- js实现的点击超链显示隐藏层
- 点击显示和隐藏层(js效果,IE FF均可)
- 点击单选接钮显示隐藏层
- 点击显示隐藏菜单,动画效果,半透明,支持所有浏览器
- Silverlight 通过点击按钮显示/隐藏DataGrid的RowDetail