How to achieve the sliding effect of CSS background image without using F12?
P粉903969231
P粉903969231 2023-08-14 19:47:48
0
1
495
<p>I'm currently trying to make a website using CSS and HTML, but I can't seem to get my background image to slide and move. I use Visual Studio Code and I ran the code on Google but it doesn't move but when I press F12 to debug it does? ! This is my code: </p> <pre class="brush:php;toolbar:false;">body { background-color: black; margin: 0; padding: 0; background-image: url("I have a correct URL, but I don't want to share it"); background-size: cover; background-repeat: no-repeat; background-attachment: fixed; animation: slide 1s linear infinite alternate; } @keyframes slide { 0% { background-position: -175% 0%; } 100% { background-position: 300% 0%; } } .container { max-width: 800px; margin: 0 auto; padding: 0px; }</pre> <p>I tried asking Chat GPT for help, but just got more confused</p>
P粉903969231
P粉903969231

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!