当前位置:网站首页>Wechat applet notes
Wechat applet notes
2022-06-12 20:00:00 【Programming diagram music】
The various file functions that make up the page :
WXSS File is a style file , This document is mainly to write some css style , These styles will only be used for WXML Files work ; JS File is the main business logic class , Including the implementation of all business logic of this page ;JSON The file is the configuration of this page , If the page is allowed to be pulled up and loaded ; WXML The file is similar to HTML The role of , Of course, it also has some special labels of its own .
WXML: Build page ;
.js: Logic code ;
.wxss: style ;
. json: The configuration file
white-space:pre-wrap Keep spaces and carriage returns for text
Attribute summary :
class Multiple can be defined wxss Selector in , But the latter has a higher priority than the former .
page{
background-color: #d2ebb6;
}
/*1、element Selectors , Written in wxss perhaps app.wxss in */
2、 Class selectors class, No examples
3、 Combination selector
image,view {
border:1px;
}
/* all image and view Labels have borders */
4、ID Selectors
#id
5、 Descendant selector
.card image{
}
ctrl+/ Can comment
One 、 Iconic language :
1、wxml Linguistic equivalent html Language , But wechat changed some of its contents
2、wxss Linguistic equivalent css Language
wxml It is equivalent to the structure and of a program wxss It is equivalent to the decoration of the program , Only when used together can it work .
wxml Language is difficult for me 1、flex The box model ;2、swiper Shuffling figure ;3input Components .
flex The box model
display:flex; // Define the box model
All defined flex The of the model is a container , Also called flex Containers .
1、flex-direction Property determines the direction of the spindle ( That is, the arrangement direction of the project ).
(row | row-reverse | column | column-reverse;)
row( The default value is ): The principal axis is horizontal , The starting point is on the left .
row-reverse: The principal axis is horizontal , The starting point is on the right .
column: The principal axis is perpendicular , The starting point is at the top .
column-reverse: The principal axis is perpendicular , Starting edge .
2、flex-wrap Attribute definitions , If an axis doesn't line up , How to wrap .
no wrap: Don't wrap , squeeze .
warp: Line break , The first row is at the top .
warp reverse: Line break , The first row is at the bottom .
3、flex-flow The attribute is flex-direction Properties and flex-wrap Attribute shorthand , The default value is row nowrap.
4、justify-content Property defines the alignment of the item on the spindle .
flex-start: Align left
flex-end: Right alignment
center: In the middle
space-between: full-justified , The interval between items is equal .
space-around: The spacing between each item is equal . therefore , The spacing between items is twice as large as the spacing between items and the border .
5、align-items Property defines how items are aligned on the cross axis .( The alignment of the vertical arrangement of sub containers )
flex-start: Align the vertices of the container
flex-end: Align the bottom of the container
center: In the middle
stretch: If the height is not set or is auto, Will fill the entire container .
baseline: Baseline alignment of the first line of text for the project .
6、align-content Property defines the alignment of multiple axes . If the project has only one axis , This property does not work .( The sub containers are arranged horizontally in multiple rows )
flex-start: Align with the starting point of the intersecting axis .( Start from the top of the container and arrange it in sequence )
flex-end: Align with the end of the cross axis .( The of the child container fills the bottom of the parent container , Leave the upper space of the parent container )
center: Align with the midpoint of the intersecting axis .( In the middle )
space-between: Align with both ends of the cross axis , The average distribution of spacing between axes .( full-justified , Average distribution in the middle )
space-around: The spacing between each axis is equal . therefore , The spacing between the axes is twice as large as the spacing between the axes and the borders .
stretch( The default value is ): The axis occupies the entire cross axis .( The tensile )
Reference resources :CSS Color name | Novice tutorial CSS Color name All browsers support color names 147 The color name is defined in HTML and CSS Color specifications (17 A standard color plus 130 Many others ). The following table lists all these , Together with its hexadecimal value . Tips : 17 Standard colors : Light green , black , Blue , Purplish red , gray , gray , green , lime , Chestnut , The navy , olive , purple , red , silver , Turquoise , White and yellow . Click the name or hexadecimal value of the color , With different color names or values, the background color will change : Sort by color name The list is sorted by hexadecimal values Color Name ..https://www.runoob.com/cssref/css-colornames.htmlCSS( Cascading style sheets ) | MDN Cascading style sheets (Cascading Style Sheets, Abbreviation for CSS), It's a kind of Style sheets Language , Used to describe the HTML or XML( Include SVG、MathML、XHTML And so on. XML Branch language ) Presentation of documents .CSS Described on the screen 、 Paper quality 、 How should elements on other media such as audio be rendered . Cascading style sheets (Cascading Style Sheets, Abbreviation for CSS), It's a kind of Style sheets Language , Used to describe the HTML or XML( Include SVG、MathML、XHTML And so on. XML Branch language ) Presentation of documents .CSS Described on the screen 、 Paper quality 、 How should elements on other media such as audio be rendered .
https://developer.mozilla.org/zh-CN/docs/Web/CSS
边栏推荐
- Demand and business model analysis -6- five topics
- [notes for question brushing] line segment tree
- Login to MySQL
- CentOS7安装MySQL5.7操作说明
- When will the index fail
- In 2022, 20 cities with the largest number of college students in China
- 简单理解防抖函数
- The execution results of i+=2 and i++ i++ under synchronized are different
- Reading small program based on wechat e-book graduation design (4) opening report
- Interpreter Files
猜你喜欢
Demand and business model innovation-5-process
Equipment management - borrowing and returning module 1
Understanding of data in memory
Detailed explanation of IO flow basic knowledge -- file and IO flow principle
Overview of object detection
The latest Ningxia construction safety officer simulation question bank and answers in 2022
Compilation of programs
Pyinstaller packaging tutorial packaging resource files
开源深度学习框架PlaidML安装及测试
[games101] class note 8 - shading (shading frequency, graphics pipeline, texture mapping)
随机推荐
Optimization of SQL statements
负数取余问题
[games101] class note 8 - shading (shading frequency, graphics pipeline, texture mapping)
Process creation fork (), demise wait()
Wall Street cheat sheet
Compilation of programs
MySQL log
Blue Bridge Cup basic-15 VIP question string comparison
开源深度学习框架PlaidML安装及测试
exec函数、shell的实现
Hardware test - why not use grounding clip for ripple test
The difference between MySQL full table scanning and indexing
Understand Jack Dorsey's web5 from the ppt on page 16
在 Traefik Proxy 2.5 中使用/开发私有插件(Traefik 官方博客)
Theory + practice will help you master the dynamic programming method
系统 日志
BannerViewPager
Reading small program based on wechat e-book graduation design (4) opening report
Equipment management - borrowing / returning module interface code
Reading small programs based on wechat e-book graduation design works (7) Interim inspection report