uniapp将盒子铺满页面,适应导航栏高度,无滚动条

 

实现效果:

 

 

实现效果:

 

 

<template>
    <view class="content">
        123
    </view>
</template>

<script>
    export default {
        data() {
            return {
            }
        },
    }
</script>

<style lang="scss">
    .content {
        height: calc(100vh);
        /*#ifdef H5 */
        height: calc(100vh - var(--window-top) - 100rpx);
        /* #endif */
        // display: flex;
        // flex-direction: column;
        background-color: pink;
    }

</style>

 

posted @ 2022-09-25 11:38  fnasklf  阅读(721)  评论(0编辑  收藏  举报