skewY()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.
skewY()
CSS 函数 用于定义在二维平面上沿垂直方向倾斜元素的变换。其结果为 <transform-function>
数据类型。
试试看
这种变换是一种剪切映射(平移),它通过在垂直方向上以一定角度扭曲元素内的每个点来实现。每个点的纵坐标(垂直,y 坐标)通过与指定角度和到原点的距离成比例的值进行修改;因此,点离原点越远,添加的值就越大。
语法
css
skewY(a)
Values
示例
HTML
html
<div>Normal</div>
<div class="skewed">Skewed</div>
CSS
css
div {
width: 80px;
height: 80px;
background-color: skyblue;
}
.skewed {
transform: skewY(40deg);
background-color: pink;
}
Result
规范
Specification |
---|
CSS Transforms Module Level 1 # funcdef-transform-skewy |
浏览器兼容性
BCD tables only load in the browser
另请参阅
transform
<transform-function>
- Individual transform properties