当前位置:网站首页>Summary of wechat applet display style knowledge points
Summary of wechat applet display style knowledge points
2022-07-04 22:58:00 【Song Xiaoyu】
1. view Label of flex Layout
flex namely HTML Medium inline, Change block elements into inline elements
display: flex;
1.1 flex Direction selection of layout
Set up flex After layout , You can choose horizontal layout or vertical layout , There are four ways
flex-direction:
row: The horizontal direction from left to right is the main axis
row-reverse: The horizontal direction from right to left is the main axis
column: The vertical direction from top to bottom is the main axis
column-reverse: The vertical direction from bottom to top is the main axis
1.2 Other options for horizontal and vertical layout
- The horizontal layout
justify-content
flex-start Start on the left ( The default value is )
flex-end From the right
flex-center align horizontal center
space-between full-justified
space-around The distance between each element is equal , And there is an equal distance between the head and the tail
- Vertical layout
align-items
stretch Fill the entire container longitudinally
flex-start Start at the top
flex-end Start at the bottom
center Vertically centered
baseline Align with the first line of text of the child element ??
Son view A property is align-self, He has five choices for vertical layout , Plus auto
1.3 control view Do you want to change lines
flex-wrap:
nowrap Don't wrap ( Default )
wrap Line break
wrap-reverse Line break , The first line is at the bottom
Reference documents : https://www.cnblogs.com/sun8134/p/6395947.html
2. Line break , Single space , Consecutive spaces
- Line break
\nIt should be noted that , Text that needs to wrap , Must be wrapped intextIn the label - Single space have access to
\t, Multiple\tShow only one space , To display multiple spaces , You can use the following method - Consecutive spaces When parsing multiple spaces Need to be wrapped in `` In the label , If the page displays
You need to adddecode="{true}"
You can directly connect multiple spaces here , Can recognize
Hello ah Ha ha ha ( The space is half the size of Chinese characters )
Hello ah Ha ha ha ( The space is the size of Chinese characters )
Hello ah Ha ha ha ( The space is set according to the font )
or
Hello ah Ha ha ha ( The space is half the size of Chinese characters )
Hello ah Ha ha ha ( The space is the size of Chinese characters )
Hello ah Ha ha ha ( The space is set according to the font )
3. shadows
- Box model shadow
box-shadowShadow of the vulva : box-shadow: Shadowy X Axis ( You can use negative values ) Shadowy Y Axis ( You can use negative values ) Shadow blur value ( size ) Color of shadow ; X The positive value of the axis indicates that the direction is right ,Y A positive value of the axis indicates that the direction is down Inner shadow : On the basis of the outer shadow, addinsetX The positive value of the axis indicates that the direction is left ,Y The positive value of the axis indicates that the direction is up - Text shadow
text-shadowAttributes of the outer shadow with the box model , Consistent function No inner shadow Reference documents : http://www.cnblogs.com/wuchuanlong/p/5980766.html
4. Gradient effect gradients
- Linear gradient (Linear Gradients)- Down / Up / towards the left / towards the right / Diagonally
- Radial Gradient (Radial Gradients)- Defined by their center
// From top to bottom ( Default )
background: linear-gradient(red, blue);
// From left to right
background: linear-gradient(to right, red , blue);
...
Reference documents : https://blog.csdn.net/u010377372/article/details/79721725
solve "\n" Unable to achieve line feed effect
In the database \n When taken out, it will become \\n, And in the small program text The effect of line breaking should be achieved in the component , You need to \\n convert to \n.
resolvent :
content.replace(/\\n/g, "\n");
file :https://blog.csdn.net/zhangying1994/article/details/86552970
边栏推荐
- SPSS installation and activation tutorial (including network disk link)
- 9 - class
- Pagoda 7.9.2 pagoda control panel bypasses mobile phone binding authentication bypasses official authentication
- A complete tutorial for getting started with redis: Pipeline
- 【lua】int64的支持
- Logo special training camp section II collocation relationship between words and graphics
- Attack and defense world misc advanced area Hong
- [odx Studio Edit pdx] - 0.2 - Comment comparer deux fichiers pdx / odx
- Business is too busy. Is there really no reason to have time for automation?
- MYSQL架构——逻辑架构
猜你喜欢

Lost in the lock world of MySQL

Redis introduction complete tutorial: client communication protocol

Redis的持久化机制

Logo special training camp Section IV importance of font design

Attack and defense world misc advanced zone 2017_ Dating_ in_ Singapore

共创软硬件协同生态:Graphcore IPU与百度飞桨的“联合提交”亮相MLPerf

Redis入门完整教程:集合详解

攻防世界 misc 高手进阶区 a_good_idea

The sandbox has reached a cooperation with digital Hollywood to accelerate the economic development of creators through human resource development

攻防世界 MISC 进阶区 Ditf
随机推荐
Google collab trample pit
【机器学习】手写数字识别
Notepad++--编辑的技巧
蓝队攻防演练中的三段作战
Advanced area a of attack and defense world misc Masters_ good_ idea
Prosperity is exhausted, things are right and people are wrong: where should personal webmasters go
攻防世界 MISC 进阶 glance-50
9 - 类
[ODX studio edit PDX] - 0.2-how to compare two pdx/odx files of compare
质量体系建设之路的分分合合
Redis: redis configuration file related configuration and redis persistence
Locust performance test - environment construction and use
mamp下缺少pcntl扩展的解决办法,Fatal error: Call to undefined function pcntl_signal()
【剑指Offer】6-10题
NFT Insider #64:电商巨头eBay提交NFT相关商标申请,毕马威将在Web3和元宇宙中投入3000万美元
On-off and on-off of quality system construction
安装人大金仓数据库
Sword finger offer 68 - ii The nearest common ancestor of binary tree
Pagoda 7.9.2 pagoda control panel bypasses mobile phone binding authentication bypasses official authentication
【ODX Studio编辑PDX】-0.2-如何对比Compare两个PDX/ODX文件