当前位置:网站首页>Web development model selection, who graduated from web development
Web development model selection, who graduated from web development
2022-06-11 11:34:00 【InfoQ】
What is? HTML?
- Simplicity : Super text markup language version upgrade adopts superset mode , So it is more flexible and convenient ;
- Extensibility : The extensive application of hypertext markup language has brought about enhanced functions , Add identifier and other requirements , Hypertext markup language takes the form of subclass elements , Guarantee for system expansion ;
- Platform independence : Although personal computers are popular , But use MAC Waiting for other machines , Hypertext markup language can be used on a wide range of platforms ;
- generality : in addition ,HTML It's the universal language of the Internet , One is simple 、 Universal all set markup language . It allows web producers to create complex pages with text and images , These pages can be accessed by anyone else on the Internet , No matter what kind of computer or browser you use ;
CSS piece
link And @import The difference between
linkyesHTMLThe way ,@importyesCSSThe way
linkMaximum support for parallel downloads ,@importToo much nesting leads to serial downloads , appear FOUC ( Document style lapses briefly )
linkCan passrel="alternate stylesheet"Specify candidate styles
- The browser to
linkSupport precedes@import, have access to@importHide style from old browser
@importMust be before the pattern rules , Can be incssOther documents are cited in the document
- On the whole :
linkbe better than@import,linkHigher priority
BFC What's the usage?
- Create rules :
- Root element
- Floating elements (
floatIt does not takenone)
- Absolute positioning elements (
positionThe value isabsoluteorfixed)
displayThe value isinline-block 、 table-cell 、 table-caption 、 flex 、inline-flexOne of the elements
overflowIt does not takevisibleThe elements of
- effect
- Can contain floating elements
- Not covered by floating elements
- Stop the parent-child element
marginFold
Several ways to clear floating
- Parent
divDefinitionheight
- Blank at the end
divlabelclear:both
- Parent
divDefine pseudo class:afterandzoom
- Parent
divDefinitionoverflow:hidden
- Parent
divAlso floating , You need to define the width
- Add... At the end
brlabelclear:both
Css3 New pseudo class - Pseudo elements
p:first-of-typeChoose the first one that belongs to its parent <p> Each of the elements <p> Elements .
p:last-of-typeChoose the last of its parent elements <p> Each of the elements <p> Elements .
p:only-of-typeThe selection is unique to its parent element <p> Each of the elements <p> Elements .
p:only-childSelect each of the unique child elements that belong to its parent element <p> Elements .
p:nth-child(2)Select each of the second child elements that belongs to its parent element <p> Elements .
:enabledEnabled form elements .
:disabledDisabled form elements .
:checkedThe radio box or check box is selected .
::beforeAdd content before element .
::afterAdd content after element , It can also be used to clear floats .
::first-lineAdd a special style line to the first line .
::first-letterAdd a special style to the initial of the text .
- Pseudo class grammar is a :, It's to make up for css The disadvantages of regular class selectors
- Pseudo element syntax two :, It's an element generated by a virtual container created out of thin air
IE Box model 、W3C Box model
- W3C The box model : Content (content)、 fill ( padding )、 The border ( margin )、 Frame ( border );
box-sizing: content-box
- width = content width;
- IE Box model : IE Of content Part of it border and padding Calculated it ;
box-sizing: border-box
- width = border + padding + content width
display:inline-block When will the gap not be displayed ?
- Remove spaces
- Use
marginnegative
- Use
font-size:0
letter-spacing
word-spacing
Inline elements float:left Whether it becomes a block level element or not ?
inline-blockpadding-toppadding-bottomwidth 、 heightIf you need to write animation manually , How long do you think the minimum interval is , Why? ?
stylus/sass/less difference
- All have “ Variable ”、“ blend ”、“ nesting ”、“ Inherit ”、“ Color blending ” Five basic characteristics
SassandLESSThe grammar is more rigorous ,LESSMake sure you use braces “{}”,SassandStylusYou can indent to show the relationship between hierarchy and nesting
SassNo concept of global variables ,LESSandStylusThere is a concept of scope similar to other languages
SassIs based onRubyLinguistic , andLESSandStylusCan be based onNodeJS NPMDownload the corresponding library and compile it ; That's why you install Sass Sometimes when you're in trouble, you'll report an error , Need to install python Script
rgba() and opacity What's the difference in the transparency of ?
rgba()andopacityCan achieve transparent effect , But the biggest difference isopacityActing on elements , And the transparency of everything inside the element ,
- and
rgba()Only the color of the element or its background .( Set up rgba Children of transparent elements do not inherit the transparency effect !)
The way to center horizontally
- The element is an in line element , Set parent element
text-align:center
- If the element width is fixed , You can set left and right
margin by auto;
- If the element is absolutely positioned , Set parent element
position by relative, Element settingleft:0;right:0;margin:auto;
- Use
flex-boxLayout , Appointjustify-contentThe attribute iscenter
displaySet totabel-ceil
The way to center vertically
- Set the display mode to table ,
display:table-cell, Simultaneous settingvertial-align:middle
- Use
flexLayout , Set toalign-item:center
- Set in absolute positioning
bottom:0,top:0, And set upmargin:auto
- Set at fixed height in absolute positioning
top:50%,margin-topThe value is a negative value of half the height
- Text vertical center setting
line-heightbyheightvalue
browser piece
The understanding of the browser kernel
- It is mainly divided into two parts :
Rendering engine、js engine
Rendering engine :Responsible for getting the content of the web page (html css img ...), And how to display the web page , And then output to the monitor or printer . Different browser cores have different syntax interpretations for web pages , So the rendering effect is different
js engine :Parsing and execution javascript To achieve the dynamic effect of the web
- Starting with the rendering engine and js The engine doesn't differentiate very clearly , later js The engine is becoming more and more independent , The kernel tends to be just a rendering engine
IE : tridentkernel
Firefox : geckokernel
Safari : webkitkernel
Opera: It used to beprestokernel ,OperaNow switched toGoogle - ChromeOfBlinkkernel
Chrome:Blink( be based onwebkit,Google And Opera SoftwareJointly develop )
HTTP The request mode scenario
GetMethod : Access to data is usually ( View the data )- see
POSTMethod : Submitting data to a server usually ( Create data )-create
PUTMethod : Submitting data to a server usually ( Update data )-update, AndPOSTMethods like , It's also about submitting data , butPUTDetermine the location of resources on the server , Often used to modify data
HEADMethod : Request only the first part of the page
DELETEMethod : Delete resources on the server
OPTIONSMethod : Used to get the currentURLSupported request mode
TRACEMethod : Used to activate a remote application layer request message loop
CONNECTMethod : Convert request links to transparentTCP/IPThe passage of
HTTP Status code
1XX: Information status code
100 continuecontinue , Generally in the sending post When asked , Has been sent. http header After that, the server will return this information , confirm , Then send the specific parameter information
2XX: Success status code
200 okNormal return information
201 createdThe request succeeded and the server created a new resource
202 acceptedThe server has received the request , But not yet processed
3XX: Redirect
301 move perThe requested page has been permanently redirected
302 foundTemporary redirection
303 see otherTemporary redirection , And always use get Request new url
304 not modifiedSince last request , The requested page has not been modified
4XX: Client error
400 bad requestThe server cannot understand the format of the request , Clients should not try to make requests again with the same content
401 unauthorizedRequest not authorized
403 forbiddenBlocking access
404 not foundCan't find how url Matching resources
5XX: Server error
500 internal server errorThe most common server side error
503 service unacailableThe server is temporarily unable to process the request ( Maybe it's overload maintenance )
Last

边栏推荐
- my. Binlog startup failure caused by the difference between [mysql] and [mysqld] in CNF
- 在毕设中学习02——numpy多维数组的切片,形态变化,维度交换
- js合并两个对象(面试题)
- Etcd introduction
- WordPress登录页面美化插件:Login Designer推荐
- nft数字藏品系统开发搭建流程
- WordPress regenerate featured image plugin: regenerate thumbnails
- UCI-HAR数据集的处理
- 启牛帮开通的证券账户是安全可信的吗?
- Development of official account system for digital collection app applet
猜你喜欢

使用Yolov3训练自己制作数据集,快速上手

Iterator mode -- battlefield autumn point

装饰模式--小美的生日蛋糕
![my. Binlog startup failure caused by the difference between [mysql] and [mysqld] in CNF](/img/bd/a28e74654c7821b3a9cd9260d2e399.png)
my. Binlog startup failure caused by the difference between [mysql] and [mysqld] in CNF

How programmers do sidelines

使用Yolov5训练好模型调用电脑自带摄像头时出现问题:TypeError: argument of type “int‘ is not iterable的解决方法

Liufan, CFO of papaya mobile, unleashes women's innovative power in the digital age

Problems encountered when using nailing intranet to penetrate and upload PHP projects

使用Labelimg制作VOC数据集或yolo数据集的入门方法

Want to be iron man? It is said that many big men use it to get started
随机推荐
外观模式--在各种套餐中早就用到啦!
js合并两个对象(面试题)
Etcd的运行时重配置
Learn 02 - slice, morphological change and dimension exchange of numpy multidimensional array
不做伪工作者
Lifeifei: I am more like a scientist in physics than an engineer
JS merge two objects (interview questions)
my. Binlog startup failure caused by the difference between [mysql] and [mysqld] in CNF
木瓜移动CFO刘凡 释放数字时代女性创新力量
Vscade -- vscode multi window name is configured as project name
MYCAT sub database and sub table
The complete manual of the strongest Flink operator is a good choice for the interview~
[C language] anonymous/unnamed struct & Union
SpingBoot+Quartrz生产环境的应用支持分布式、自定义corn、反射执行多任务
WordPress regenerate featured image plugin: regenerate thumbnails
Collection of practical WordPress plug-ins (under update)
使用Yolov5训练自己制作的数据集,快速上手
Publish WordPress database cache plug-in: DB cache reloaded 3.1
普通人应当如何挑选年金险产品?
An introduction to creating VOC datasets or Yolo datasets using labelimg