zoukankan      html  css  js  c++  java
  • 前端隐藏Ios及安卓滚动条

    1、方法不通用
    // .scroll_list::-webkit-scrollbar { display:none }
    .scroll_list::-webkit-scrollbar-track
    {
    background-color: transparent;
    -webkit-box-shadow: inset 0 0 6px transparent;
    }
    /*定义滚动条高宽及背景*/
    .scroll_list::-webkit-scrollbar
    {
    0px;
    background-color: transparent;
    }
    /*定义滚动条*/
    .scroll_list::-webkit-scrollbar-thumb
    {
    background-color: transparent;
    border-radius: 0;
    }
    2、通用方法
     

    前端隐藏滚动条:

    3层:

    最外层:container:{

    overflow: hidden;

            height: 2.4rem; //设置固定高度

    }

    中间层(视口):overflow-x: auto;

                      overflow-y: hidden;

                      box-sizing: border-box;

                      padding-bottom: 0.2rem;

          设置overflow和padding-bottom将底部滚动条挤压出底部从而移除视线,无法展示。

    最里层:宽度为内容宽度,是产生滚动条的元素。

  • 相关阅读:
    GIT 相关
    createFile
    值传递、指针传递、引用传递
    Sightseeing trip
    find the longest of the shortest
    Laurenty and Shop
    Dima and Lisa
    Marina and Vasya
    Kolya and Tanya
    Two Substrings
  • 原文地址:https://www.cnblogs.com/qdcnbj/p/10040294.html
Copyright © 2011-2022 走看看