What are the new background properties and text properties in html5
Editor to share with you what are the new background attributes and text attributes in html5, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
First, the background image shows:
① background-size: specifies the size of the background image
Value: pixel value, percentage, auto, cover, contain
② background-origin: specifies the starting position of the background image
Value: padding-box (default), content-box, border-box
③ background-clip
Value: padding-box, content-box, border-box (default)
2. HSLA:
New color attribute
H: hue
S: saturation
L: brightness
A: transparency
Add gradient colors:
Radial-gradient: (* position (deg), color percentage,color percentage); Radial gradient linear-gradient: (* position,color percentage,color percentage); Linear gradient
Fourth, add reflection:
-webkit-box-reflect: (direction,offset,color (linear), url)
5. MASKS masks and masks
-webkit-mask: (url,repeat,position,size)
VI. Custom fonts:
@ font-face {font-family:'iconfont'; defines the font name src:url ('iconfont.tff'); load font}
7. Multi-line text provincial abbreviations: (four lines of css)
-webkit-box-orient:vertical = > text vertical display-webkit-line-clamp:3 = > Show 3 lines of text display:webkit-box = > Elastic Box Model overflow:hidden = > overflow Hidden
8. Text shadow: (can be used in combination)
Text-shadow:offsetX,offsetY, blur distance, color
The above is all the content of the article "what are the new background and text attributes in html5?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!