문제

I want to remove this background color after 10 seconds using php. I don't want to use js, css. Is it possible to remove background color using pure php code?

<?php $running_location = '<p style="background:#E1FEE0;"></p>' ?>;
도움이 되었습니까?

해결책

PHP runs on the server. All the work it does is finished before the browser receives the page.

Server side code cannot alter the page on the client after the page has been delivered.

You have to use a client side technology for this. Sensible approaches would be CSS animations or JavaScript. (NB: I'm assuming CSS animations can do this, I haven't used them enough to be sure).

Less sensible options would be to use a refresh either via HTML meta or HTTP to load an entirely new page from the server (which is identical but without the background colour).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top