Home > Web Front-end > H5 Tutorial > Introduction to several new background attributes and text attributes in html5

Introduction to several new background attributes and text attributes in html5

黄舟
Release: 2017-10-23 10:11:54
Original
1896 people have browsed it

1. Background image display:

①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

3. Add new gradient color:

radial-gradient:(*position(deg),color percentage,color percentage);径向渐变
linear-gradient:(*position,color percentage,color percentage);线性渐变
Copy after login

4. Added reflection:

-webkit-box-reflect:(direction,offset,color(可线性),url)
Copy after login

5. MASKS mask and mask:

-webkit-mask:(url,repeat,position,size)
Copy after login

6. Custom font:

@font-face{
  font-family:'iconfont';定义字体名
  src:url(‘iconfont.tff’);加载字体
}
Copy after login

7. Multi-line text ellipsis: (four in total Line css)

-webkit-box-orient:vertical  =>文本垂直显示
-webkit-line-clamp:3  =>显示 3 行文本
display:webkit-box  =>弹性盒模型
overflow:hidden  =>溢出隐藏
Copy after login

8. Text shadow: (can be used in combination)

text-shadow: offsetX, offsetY, blur distance, color

The above is the detailed content of Introduction to several new background attributes and text attributes in html5. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template