制作页面右下脚伸缩框样式

复制代码
<div class="fix-bottom fix-bottom-code">
        <div class="list-item">
                <div class="item-info hide">
                    <img src="/resources/img/v2/ewmtb_1.png">
                    <div class="sm-txt">扫描二维码关注</div>
                </div>
                <a href="#" class="code">
                    <span class="icons-code-lg"></span>
                    <span class="txt">微信扫描</span>
                </a>
        </div>
        
    </div>
    <div class="fix-bottom fix-bottom-home">
        <div class="list-item">
            <a href="#">
                    <span class="icons-home-lg"></span>
                    <span class="txt2">返回首页</span>
            </a>
        </div>
        
    </div>
    <div class="fix-bottom fix-bottom-comment">
        <div class="list-item">
            <a href="#">
                    <span class="icons-comment-lg"></span>
                    <span class="txt2">意见反馈</span>
            </a>
        </div>
    </div>
    <div class="fix-bottom fix-bottom-up">
        <div class="list-item">
            <a href="#">
                    <span class="icons-up-lg"></span>
                    <span class="txt2">返回顶部</span>
            </a>
        </div>    
    </div>
复制代码
复制代码
/*右下脚悬浮操作开始*/
.fix-bottom-code {
    position: fixed;
    bottom: 217px;
    right: -75px;
}

.fix-bottom-home {
    position: fixed;
    bottom: 161px;
    right: -75px;
}

.fix-bottom-comment {
    position: fixed;
    bottom: 105px;
    right: -75px;
}

.fix-bottom-up {
    position: fixed;
    bottom: 50px;
    right: -75px;
}

.fix-bottom .list-item a {
    border: 1px solid #DBDBDB;
    border-radius: 4px 0 0 4px;
    width: 120px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-right: none;
    padding-left: 14px;
    background-color: #fff;
}

.fix-bottom-code>.list-item>a {
    background-color: #219EED;
    border: none;
    border-radius: 0;
}

.fix-bottom>.list-item>a>.txt2 {
    display: inline-block;
    font-size: 13px;
    color: #555;
    margin-left: 15px;
}

.fix-bottom>.list-item .sm-txt {
    color: #333;
    font-size: 13px;
    text-align: center;
    margin-bottom: 5px;
}

.fix-bottom-code>.list-item>a>.txt {
    font-size: 13px;
    color: #fff;
    margin-left: 15px;
}

.fix-bottom-code>.list-item>.item-info {
    border: 1px solid #219EED;
    text-align:center;
}

.icons-code-lg {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url(/resources/img/v2/sytbhc_1.png);
    background-position: -100px -100px;
}

.icons-home-lg {
    display: inline-block;
    width: 20px;
    height: 17px;
    background-image: url(/resources/img/v2/sytbhc_1.png);
    background-position: -150px -100px;
}

.icons-comment-lg {
    display: inline-block;
    width: 23px;
    height: 21px;
    background-image: url(/resources/img/v2/sytbhc_1.png);
    background-position: -200px -100px;
}

.icons-up-lg {
    display: inline-block;
    width: 19px;
    height: 11px;
    background-image: url(/resources/img/v2/sytbhc_1.png);
    background-position: -250px -100px;
}
/*右下肢悬浮操作结束*/
复制代码
复制代码
function initHoverBottombar() {
    $('.fix-bottom').hover(function(e) {
        var this$ = $(this);
        this$.find('.item-info').removeClass('hide');
        this$.animate({
            'right': "0"
        });
    }, function(e) {
        var this$ = $(this);
        this$.animate({
            'right' : '-75px'
        },function(e){
            this$.find('.item-info').addClass('hide');
        });
    });
}
复制代码

总结:

1、刚开始我是使用ur-li这种来做,但是点击其中一个,其它的都展开了,然后又替换成div-div但是这种也有相同情况,于是我只好分开来做用div div同级来做,这样就没问题了,我在想这个问题可能跟子绝对定位有关系!!!

posted @   Seaurl  阅读(584)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· SQL Server 2025 AI相关能力初探
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
历史上的今天:
2015-09-02 C# 线程操作
2015-09-02 WinForm如何调用Web Service
2015-09-02 解决:Access denied for user ''@'sinochip-79e833' (using password: NO)
2013-09-02 oracle里如何将两个日期的时间差返回**时**分的格式
点击右上角即可分享
微信分享提示