我想在前后制作一个以图像为背景的 block 引用。 :before 不是问题,但是使用 :after 选择器,图像会保留在前景中。文本消失...
我用 css 尝试了不同的解决方案,比如 display inline-block;giving the paragraph index:99 等等。
CSS:
blockquote p:after{
content:"";
height:50px;
width:50px;
background:url("https://proef-domein.nl/chiropractic/wp-content/uploads/2019/06/quotes.png");
margin-left:-30px;
z-index:1;
position:absolute}
位置正确,但图像停留在文本上方而不是文本下方。
最佳答案
试试这个它在我的本地安装上有效:
z-index:-1;
关于css - 如何在 :after selecter stay on background and correct position? 中制作背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56888407/