CSS来适配PC和手机端

直接上代码,可以根据设备宽度来区分,下面的max-width好像无效

@media only screen and (min-device-width: 120px) and (max-device-width:780px) and (-webkit-min-device-pixel-ratio: 2) {
    .layui-table-view {
        overflow: auto !important;
    }
    .my-header ul.my-header-user-nav li a.pay {
        display: none;
    }
}

/* @media screen and ( max-width: 1280px) {
    .my-header ul.my-header-user-nav li a.pay {
        display: none;
    }
}

@media screen and (min-width: 1281px) and ( max-width: 1980px) {
    .layui-table-view {
        overflow: hidden !important;
    }
} */

猜你喜欢

转载自blog.csdn.net/wuyongde0922/article/details/81125896
今日推荐