Home >Web Front-end >CSS Tutorial >Summary of CSS usage skills in WeChat mini programs
This article introduces a summary of the CSS usage skills in the recently popular WeChat mini program. Students in need can refer to this article
WeChat mini program CSS usage skills
1: Use pure CSS to create a triangle and hide the top, left and right sides (set the color to transparent)
.demo { width:0; height:0; border-width:20px; border-style:solid; border-color:transparenttransparentredtransparent; } |
2: Settings Maximum height..You can slide after exceeding it
ellipsis: Use ellipsis to represent the trimmed text string: Use the given string to represent the trimmed text The key point is to use three at the same time: text-overflow:ellipsis;white-space:nowrap;overflow:hidden; |
# #4:overflow: hidden When forcing no line breaks, use overflow:hidden to hide the part beyond the interface
5: margin-bottom is invalid
##margin-bottom is below Margins cannot move elements downward, and margin-top serves as the top margin to "push" elements down.
|
| ##Automatic line wrapping
##
p{ word-wrap: break-word; word-break:normal; }
|
p{ word-break:break-all; }
The above is the detailed content of Summary of CSS usage skills in WeChat mini programs. For more information, please follow other related articles on the PHP Chinese website!