I had a problem writing the scrollable view area, so I took a moment to share it, but the vertical scrollable view is not a big problem, just set height: RPX; Roll height area, while horizontal roll area needs to pay attention to two issues.
(1) Achieve results
(2) Pay attention to setting two properties
At first thought that as long as according to introduce WeChat official document can think how to write how to write, the results have been debugging not to come out, according to the official introduction of attribute set, child element container will each have a line, and the parent container will content line feeds, tried a lot of CSS properties, only to find that you need to set up the two attributes can be:
1, display: inline – block; Set the child element container to an interline module:
Explain some of the common attributes of display: inline, block, inline-block
Inline :(1) an element becomes an inline element, which shares a row with other inline elements but does not occupy the row. (2) an element cannot change its height, width values, which are delimited by its content. (3) an element can use padding, which is the same as an inline element. Margin left and right create margin effects, but top and bottom do not.
Block :(1) make the element a block-level element that occupies a single row. (2) change the height and width of the element. (3) set the padding, left, and top attributes of the element. Inline-block: combines some of the features of an inline and a block, including the first inline feature and the second and third features of a block. In layman’s terms, a block-level element that does not have a single row. You can check out this article for details
2. Set the parent element containerwhite-space: nowrap;
Container display without newline:
If you have any other questions, please leave a message.