Home  >  Article  >  Web Front-end  >  How to solve the problem of mui frame off-canvas sliding beyond the partially hidden part and unable to scroll

How to solve the problem of mui frame off-canvas sliding beyond the partially hidden part and unable to scroll

小云云
小云云Original
2018-01-27 09:51:171512browse

One disadvantage of off-canvas side sliding in the mui framework is that the scroll bar cannot appear, because its main purpose is to set a pattern similar to the QQ interface, so it cannot scroll. So how to solve this problem? This article mainly shares with you an article that perfectly solves the problem of mui framework off-canvas slipping beyond the partial hiding and unable to scroll. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor to take a look, I hope it can help everyone.

Solution:

1. Add the id to the content container, and then control it through JS

<p class="mui-content mui-scroll-wrapper" id="scr1">

JS part

<script>
mui('#scr1').scroll();
</script>

2. Create a subpage using Method:

mui.init({
subpages:[{
url:'index.html',   //要引入的页面
id:'index.html' , //要引入页面的标志
style:{
top:'50px',   //页面顶部的位置
bottom:'0px'
}
extrax{}    //额外扩展参数
}]
});

You can write content in the index.html page, and scroll bars will appear.

Related recommendations:

MUI realizes the side sliding menu effect

How to realize the side sliding function

jQuery+CSS implements a side-sliding navigation menu code_jquery

The above is the detailed content of How to solve the problem of mui frame off-canvas sliding beyond the partially hidden part and unable to scroll. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn