CSS3伪元素构造文章水印背景代码及效果
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);
}
复制代码效果:
作者:codercao
链接:https://juejin.im/post/5b6d0c5cf265da0f504a837f版权所有:Ns to 作者 大家。如需商业转载,请联系作者以获得批准。非商业转载请注明来源。
版权声明
本文仅代表作者观点,不代表Code前端网立场。
本文系作者Code前端网发表,如需转载,请注明页面地址。
上一篇:CSS3伪元素应用页码摘要效果 下一篇:css3伪元素和平移变换进行的提示框
code前端网