rocsi Posted February 19 Share Posted February 19 (edited) Hey, I am using this code to add an image to a page of my website. i wanted to make it change the background opacity and control the size and pozition but I can't find a way to do that. This is my current code: [data-section-id="65a17e4f7a733c1afbbca853"]{ .section-background{ &::after { /*creating the element*/ content: ""; width:100%; height:100%; position: absolute; /*adding the image*/ background-image:url(https://images.squarespace-cdn.com/content/v1/64bf900d35d1b51f0d7fc93a/329ec592-3468-4888-85f3-3861f9e77b7c/background.png?format=2500w); background-repeat:no-repeat; I tried adding this to the code as an addition to the one above - not working. background-repeat:no-repeat; background-attachment: fixed; background-position: center; background-size: cover; If anyone can help please let me know! Edited February 19 by rocsi spelling mistake Link to comment
tuanphan Posted February 21 Share Posted February 21 Can you share link to page where you use effect? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment