【CSS】非常简单的css实现div悬浮页面底部 ----利用color ui 在uniapp中让自定义tabbar 样式固定在手机底部


利用color ui 在uniapp中让自定义tabbar 样式固定在手机底部

<div id="demo_div"></div>
复制代码
<style>
    #demo_div{ 
   left: 0;
        position: fixed; 
        bottom: 0; 
        width: 100%; 
    } 
</style>                    
复制代码

 只用css就实现了悬浮底部

 

转载:https://www.cnblogs.com/BearLee/p/8109871.html

 

------------------------------------------------------color ui ---uniapp----------------------------------------------------------------------

 

 

 

 

<template>
    <view>
        <cu-custom bgColor="bg-gradual-pink" :isBack="true"><block slot="backText">返回</block><block slot="content">操作条</block></cu-custom>
    
    
    <view class="botton-clas">
        <text>fdsfsdfsdfsd</text>
    </view>
      <view class="contnt-clas">
          发的范德萨发
        fdsfsdfsdfsdfsdf
      </view>
      <view class="contnt-clas">
          发的范德萨发
              fdsfsdfsdfsdfsdf
      </view>
        <view class="box">
            
            <view class="cu-bar tabbar bg-black">
                <view class="action text-green">
                    <view class="cuIcon-homefill"></view> 首页
                </view>
                <view class="action text-gray">
                    <view class="cuIcon-similar"></view> 分类
                </view>
                <view class="action text-gray add-action">
                    <button class="cu-btn cuIcon-add bg-green shadow"></button>
                    发布
                </view>
                <view class="action text-gray">
                    <view class="cuIcon-cart">
                        <view class="cu-tag badge">99</view>
                    </view>
                    购物车
                </view>
                <view class="action text-gray">
                    <view class="cuIcon-my">
                        <view class="cu-tag badge"></view>
                    </view>
                    我的
                </view>
            </view>

        
        </view>

    

    

    
        
    </view>
</template>

<script>
    export default {
        data() {
            return {
                InputBottom: 0
            };
        },
        methods: {
            InputFocus(e) {
                this.InputBottom = e.detail.height
            },
            InputBlur(e) {
                this.InputBottom = 0
            }
        }
    }
</script>

<style>
    .box {
        left: 0;
                position: fixed; 
                bottom: 0; 
                width: 100%; 
    }
    .contnt-clas{
        width: 100%;
        height: 2000upx;
    }

    .box view.cu-bar {
        
    }
</style>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM