css3伪元素实现带角度的底部倾斜的边界

2018-12-2615:40:46网页制作Comments2,598 views字数 422阅读模式

原理:修改webkit-transform: skewY属性来修改倾斜度(旋转也是一样的道理)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/zhizuo/9077.html

.edge--bottom {
    position: relative;
    z-index: 1;
}
.edge--bottom:after {
    background: inherit;
    content: '';
    display: block;
    height: 50%;
    left: 0;
    position: absolute;
    right: 0;
    z-index: -1;
}
.edge--bottom:after {
    bottom: 0;
    -webkit-transform: skewY(-1.5deg);
    -ms-transform: skewY(-1.5deg);
    transform: skewY(-1.5deg);
    -webkit-transform-origin: 100%;
    -ms-transform-origin: 100%;
    transform-origin: 100%;
}
复制代码

效果:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/zhizuo/9077.html

css3伪元素实现带角度的底部倾斜的边界文章源自菜鸟学院-https://www.cainiaoxueyuan.com/zhizuo/9077.html

作者:codercao文章源自菜鸟学院-https://www.cainiaoxueyuan.com/zhizuo/9077.html

文章源自菜鸟学院-https://www.cainiaoxueyuan.com/zhizuo/9077.html
  • 本站内容整理自互联网,仅提供信息存储空间服务,以方便学习之用。如对文章、图片、字体等版权有疑问,请在下方留言,管理员看到后,将第一时间进行处理。
  • 转载请务必保留本文链接:https://www.cainiaoxueyuan.com/zhizuo/9077.html

Comment

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定