jquery实现盒子下拉效果示例代码 - Web前端
作者:98wpeu发布时间:2026-05-21分类:网页前端技术浏览:11
导读:复制代码代码如下:<scriptsrc="JS/JQuery1.7.js"></script><scripttype="text/javasc...
复制代码 代码如下:
<script src="JS/JQuery1.7.js"></script>
<script type="text/javascript">
$(function () {
$('div:eq(1)').CSS({ 'margin-top': '-=100px' });
$('div:first').mouSEOver(function () {
$('div:eq(1)').Animate({'margin-top':'+=100px'});
})
$('div:first').mouseout(function () {
$('div:eq(1)').animate({ 'margin-top': '-=100px' });
})
</script>
复制代码 代码如下:
<PRe name="code" class="html"><div style="width:600px;height:300px;overflow:hidden;">
<div style="background-color:#000;height:100px;">
</div>
<div style="background-color:#eee;height:300px;">
</div>
</div></pre><br>
<pre></pre>
<pre name="code" class="HTML"></pre><pre name="code" class="html">当把鼠标移动到盒子上的时候上面就会出现一个黑色的盒子</pre><pre name="code" class="html">这是在浏览网页的时候看到的一个效果</pre><pre name="code" class="html">在这里写了一下</pre>
<script src="JS/JQuery1.7.js"></script>
<script type="text/javascript">
$(function () {
$('div:eq(1)').CSS({ 'margin-top': '-=100px' });
$('div:first').mouSEOver(function () {
$('div:eq(1)').Animate({'margin-top':'+=100px'});
})
$('div:first').mouseout(function () {
$('div:eq(1)').animate({ 'margin-top': '-=100px' });
})
</script>
复制代码 代码如下:
<PRe name="code" class="html"><div style="width:600px;height:300px;overflow:hidden;">
<div style="background-color:#000;height:100px;">
</div>
<div style="background-color:#eee;height:300px;">
</div>
</div></pre><br>
<pre></pre>
<pre name="code" class="HTML"></pre><pre name="code" class="html">当把鼠标移动到盒子上的时候上面就会出现一个黑色的盒子</pre><pre name="code" class="html">这是在浏览网页的时候看到的一个效果</pre><pre name="code" class="html">在这里写了一下</pre>
相关推荐
- jquery获取子节点和父节点的示例代码 - Web前端
- jQuery焦点图切换特效插件封装实例 - Web前端
- jquery $.each() 使用小探 - Web前端
- jQuery图片轮播的具体实现 - Web前端
- 点击表单提交时出现jQuery没有权限的解决方法 - Web前端
- jquery对dom的操作常用方法整理 - Web前端
- jQuery当鼠标悬停时放大图片的效果实例 - Web前端
- jQuery 全选/反选以及单击行改变背景色实例 - Web前端
- MultiSelect左右选择控件的设计与实现介绍 - Web前端
- artDialog双击会关闭对话框的修改过程分享 - Web前端
- 网页前端技术排行
- 最近发表
-
- WordPress随机显示特色图片插件:Random Post Thumbnails
- KeePass实现Chrome浏览器自动填充密码方法一
- LNMP一键包nginx 301强制跳转到https教程
- KeePass实现Chrome浏览器自动填充密码方法二
- #建站# 免费的VPS管理软件Xshell8/Xftp8中文版下载
- 使用Xshell 8连接VPS教程_电脑登录vps的方法
- WordPress评论界面添加烟花????效果
- 不同浏览器书签同步方案:坚果云+Floccus_详细使用教程
- iOS端KeePassXC客户端APP:Strongbox Password Safe
- 给WordPress评论中的Gravatar头像图片添加ALT属性


