CSS3 伪元素构建文章水印背景代码及效果

2018-12-2615:47:09网页制作Comments2,611 views字数 382阅读模式
h1 {
    position: relative;
    margin: 0;
    font-weight: bold;
    letter-spacing: -0.05rem;
    line-height: 1;
    text-transform: uppercase;
    z-index: 10;
}
h1:before {
    content: "2018/08";
    font-family: monospace;
    font-size: 10rem;
    position: absolute;
    top: 2rem;
    left: -2rem;
    z-index: 0;
    line-height: 1;
    color: rgba(50, 25, 0, 0.1);
}
复制代码

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

CSS3 伪元素构建文章水印背景代码及效果文章源自菜鸟学院-https://www.cainiaoxueyuan.com/zhizuo/9082.html

作者:codercao
链接:https://juejin.im/post/5b6d0c5cf265da0f504a837f
来源:掘金
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/zhizuo/9082.html

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

Comment

匿名网友 填写信息

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

确定