jquery实现更多内容效果

体验效果:http://hovertree.com/texiao/jquery/33/写个“更多内容的展开/收起”的js代码如下:转自:http://hovertree.com/h/bjaf/6

大家好,又见面了,我是全栈君,今天给大家准备了Idea注册码。

全栈程序员社区此处内容已经被作者隐藏,请输入验证码查看内容
验证码:
请关注本站微信公众号,回复“验证码”,获取验证码。在微信里搜索“全栈程序员社区”或者“www_javaforall_cn”或者微信扫描右侧二维码都可以关注本站微信公众号。

体验效果:http://hovertree.com/texiao/jquery/33/

写个“更多内容的展开/收起”的js

代码如下:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>jQuery实现收起展开功能 - 何问起</title><base target="_blank" />
<meta charset="utf-8" />
<style>
a{color:darkgreen}
.hovertreeContent{width:300px;text-indent:2em;margin:5px auto;height:60px;overflow:hidden;position:relative;border:1px solid silver;}
.hewenqiToggle{height:20px;background-color:#f0f0f0;border-top:1px solid silver;position:absolute;bottom:0px;width:100%;}
.triangle-down-hovertree { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 16px solid #999;position:absolute;right:0px;left:0px;margin:0px auto; top:2px;cursor:pointer;}
.triangle-up-hovertree { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 16px solid #999; position:absolute;right:0px;left:0px;margin:0px auto;top:2px; }
</style>
<script src="http://hovertree.com/ziyuan/jquery/jquery-1.12.1.min.js"></script>

</head>
<body>
<div style="width:730px;margin:0px auto;text-align:center;">
<h2>jQuery实现收起展开功能</h2>
<a href="http://hovertree.com/h/bjaf/6sm1esjw.htm">原文</a> <a href="http://hovertree.com">首页</a> <a href="http://hovertree.com/texiao/">特效</a>
</div>
<div class="hovertreeContent">
受到网店的影响,服装店的生意逐渐有所下降,老板找何问起去谈,大概是准备跟上网购潮流,让何问起准备一下,
要在网上开网店,要为服装店建立网站。
何问起也没说自己经验不足,只说会积极准备。于是抓紧时间查找资料,学习练习。
<div class="hewenqiToggle"><span class="triangle-down-hovertree"></span></div>
</div>
<script>
$(".hewenqiToggle").on("click", function () {
if ($(".hewenqiToggle").css('position') == "absolute") {
$(".hovertreeContent").height("auto");
$(".hewenqiToggle").css({ "position": "relative" });
$(".hewenqiToggle").find("span").removeClass('triangle-down-hovertree').addClass('triangle-up-hovertree');
}
else
{
$(".hovertreeContent").height("60");
$(".hewenqiToggle").css({ "position": "absolute" });
$(".hewenqiToggle").find("span").removeClass('triangle-up-hovertree').addClass('triangle-down-hovertree');
}
})
</script>
</body>
</html>

转自:http://hovertree.com/h/bjaf/6sm1esjw.htm

更多特效:http://www.cnblogs.com/roucheng/p/texiao.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/120649.html原文链接:https://javaforall.net

(0)
上一篇 2021年12月22日 上午7:00
下一篇 2021年12月22日 上午7:00


相关推荐

  • M1芯片Mac 安装git

    M1芯片Mac 安装gitM1 芯片 Mac 安装 git 本文 git 安装是使用了 mac 下的包管理工具 homebrew 如果你还没有安装 那真是太不应该了 作为一个开发人员 首先你要安装 homebrew 因为它实在是太方便了 homebrew 安装教程 M1 芯片 MacHomebrew 安装直接使用 homebrew 安装即可 brewinstallg 配置查看是否已配置 cd ssh 如果不能进入该目录 说明没生成过 检查下是否配置过 git 账户 gitconfiglis 重

    2026年3月18日
    2
  • 英语固定搭配网站

    英语固定搭配网站https linggle com

    2025年10月6日
    5
  • 分布式事务–Hmily(feign)「建议收藏」

    分布式事务–Hmily(feign)「建议收藏」其他网址

    2022年5月21日
    54
  • Android Studio 4.2没有GsonFormat解决办法

    Android Studio 4.2没有GsonFormat解决办法

    2021年10月2日
    82
  • 逻辑回归中的coef

    逻辑回归中的coef最近看逻辑回归一个线性可分案例的时候看到了如下的代码 coef1 theta final 0 0 theta final 2 0 coef2 theta final 1 0 theta final 2 0 然后想了一下 这个两个是决策边界的系数 可以理解为 sigmoid 函数是原本的一个函数的映射 所以原来函数会有一个决策边界 比如有两个特征 X1 X2 画出来的图如下 这个红线就是决策边界 公式推导 sigmoid

    2026年3月19日
    2
  • Mac如何修改host文件「建议收藏」

    Mac如何修改host文件「建议收藏」首先开启一个文件夹,点击上方【前往】-&gt;【前往文件夹】。 输入“/private/etc/hosts”,点击【前往】。 自动开启“etc”文件夹,找到【hosts文件】,并将其拉到桌面上才能修改桌面上的hosts文件。 “右键”桌面上hosts文件,选择【打开文件的应用程序】,使用【文字编辑】开启。 开启编辑hosts文件。 编辑完后就把桌面上的…

    2022年10月12日
    4

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号