Home  >  Article  >  Web Front-end  >  The problem of WeChat applet moving with the page in fixed

The problem of WeChat applet moving with the page in fixed

巴扎黑
巴扎黑Original
2017-07-23 16:20:599204browse

The problem of WeChat applet moving with the page in fixed

Let me introduce to you the problem of WeChat applet moving with the page in fixed!

Specific situation:

There is no problem in the simulator, but the following problems occur on the real machine

61d90be9d2f4c66acf53b3eb6fb9f09d In a view box, the view box is fixedly positioned. When the page slides, the fixedly positioned box will be set at the relative position of the screen, but the textarea component in the box will slide with the page (the component is fixed at the relative position the position of the page, not the relative position of the screen).

Solution:

It is mentioned in the official documentation-->If the textarea is in a position:fixed area, the specified attribute fixed needs to be displayed as true.

Link:

<textarea name="textarea" class="canael_textarea" fixed="true"/>

Note: When filling in the

attribute, fixed defaults to false, but if If there is a business that needs to change the state (a certain state needs to be false, a certain state needs to be true), you need to add binding. If you write false directly, it will be converted to true by default.

For example:

fixed="true" (the result is true), fixed="false" (the result will also be true), so the parameters need to be bound

 <textarea name="textarea" class="canael_textarea" fixed="{{tag}}"/>
   app =        tag:    })

Summary:

The lesson of this bug is that official documents are edicts. You should read more and look carefully. What a painful realization! ! //(ㄒoㄒ)//

The above content is for learning, summary and sharing. If there is anything wrong or something that can be optimized, you are welcome to give me your advice.

The above is the detailed content of The problem of WeChat applet moving with the page in fixed. 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