天天看點

css 禁止滾動條 測試

.sp-message-open {
      margin-top: 0px !important;
      overflow: hidden !important;
      left: 0 !important;
      right: 0 !important;
      top: 0 !important;
      bottom: 0 !important;
      position: fixed  !important;
    }

      
.tp-modal-open {
            overflow: hidden !important; /*是否顯示滾動條*/
            -webkit-overflow-scrolling: touch; /*使用具有回彈效果的滾動, 當手指從觸摸屏上移開*/
        }

            .tp-modal-open.tp-modal-resizing {
                -webkit-overflow-scrolling: auto; /* 使用普通滾動, 當手指從觸摸屏上移開,滾動會立即停止 */
            }

        .tp-modal {
            overflow-x: hidden;    /*水準滾動條*/
            overflow-y: scroll;  
            display: none;
            position: fixed;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            transform: translate3d(0, 0, 0);
        }      
var t =document.getElementsByTagName("script")
    for(var i=0;i<t.length;i++)
    {
        t[i].parentNode.removeChild(t[i]);
        //t[i].remove();
    }
console.log(t);
var t =document.getElementsByTagName("meta")
    for(var i=0;i<t.length;i++)
    {
        t[i].parentNode.removeChild(t[i]);
        //t[i].remove();
    }
console.log(t);

// .sp-message-open      
function func(index)
    {
        var obj = document.getElementsByTagName("script")[0];
        if(obj) //存在
        {
            obj.parentNode.removeChild(obj);
            console.log(index);
            func(index++);
        }
    }
    func(0);      

繼續閱讀