https://www.runoob.com/cssref/css-functions.html
函数 | 描述 | css版本 |
attr() | 返回选择元素的属性值。 | 2 |
calc() | 允许计算 CSS 的属性值,比如动态计算长度值。 | 3 |
linear-gradient() | 创建一个线性渐变的图像 | 3 |
radial-gradient() | 用径向渐变创建图像。 | 3 |
repeating-linear-gradient() | 用重复的线性渐变创建图像。 | 3 |
repeating-radial-gradient() | 类似 radial-gradient(),用重复的径向渐变创建图像。 | 3 |
使用 calc() 函数计算 <div> 元素的宽度:
#div1 { position: absolute; left: 50px; width: calc(100% - 100px); border: 1px solid black; background-color: yellow; padding: 5px; text-align: center; }