鼠标划入一块区域高度增长弹出,划出时高度减小消失;

css部分:

把区域固定在右下角


        <style>
            .contact_suspension_frame {
                right: 0;
                z-index: 15;
                position: fixed;
                bottom: 0;
            }
            .suspension_frame_box {
                border: 1px solid #4da1e1;
                background: #fafafa;
                width: 175px;
                position: relative;
            }
            .suspension_frame_box h2 {
                height: 34px;
                line-height: 34px;
                padding: 0 3px;
                font-size: 14px;
                color: #fff;
                background: #3399FE;
                margin: 1px;
            }
            .suspension_frame_box h2 b {
                display: inline-block;
                width: 21px;
                height: 22px;
                vertical-align: middle;
                margin-top: 1px;
                background: url(images/icon/icon_sprites.png) no-repeat 0 -880px;
            }
            .suspension_frame_box h2 span {
                vertical-align: middle;
                display: inline-block;
                margin-top: -1px;
                height: 34px;
            }
            .suspension_frame_box table {
                margin: 0 0 20px 14px;
                text-align: left;
                width: 144px;
                font-size: 12px;
            }
            .suspension_frame_box table tr th {
                padding: 5px 0;
                color: #999;
                font-weight: normal;
            }
            .suspension_frame_box table tr td {
                color: #666;
            }
        </style>

HTML部分:

<div class="contact_suspension_frame">
            <div class="suspension_frame_box" id="suspensionFrame">
                <h2><b></b>&nbsp;<span>立即咨询价格和流程</span></h2>
                <div id="contactContent" class="contactContent" style="display: none; height: 0px; overflow: hidden;">
                    <table>
                        <tbody><tr>
                            <th valign="middle"><img src="resources/images/icon/suspension_frame_icon03_v2.jpg" alt="电话"></th>
                            <td>888-888-888</td>
                        </tr>
                        <tr>
                            <th valign="middle"><img src="resources/images/icon/suspension_frame_icon02_v2.jpg" alt="QQ"></th>
                            <td>88888888</td>
                        </tr>
                        <tr>
                            <th valign="middle"><img src="resources/images/icon/suspension_frame_icon01_v2.jpg" alt="微信"></th>
                            <td><img src="resources/images/two_dimensional_code.jpg" alt="二维码"></td>
                        </tr>
                        <tr>
                            <th></th>
                            <td>
                                <a target="_blank" href="javascript:;">
                                    <img src="http://wpa.qq.com/pa?p=2:800002255:41" alt="点击这里给我发消息" title="点击这里给我发消息">
                                </a>
                            </td>
                        </tr>
                    </tbody></table>
                </div>
            </div>
        </div>

js部分:

<script>
        $(".contact_suspension_frame").hover(function(){
            $("#contactContent").show();
            $("#contactContent").stop().animate({height:"195px"},"normal",function(){
                
            });
        },function(){
            $("#contactContent").stop().animate({height:"0px"},"normal",function () {
            $("#contactContent").hide();
            });
        });
    </script>

 

转载于:https://www.cnblogs.com/lym520/p/6141004.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值