dpp89959 2015-04-03 17:13
浏览 90

如何将PHP-Processing屏幕颜色设置为黑色(不要白屏)

On the site I have developed, the user must login with a $_POST request to validate credentials. I have implemented a jQuery UI effect that makes the screen black (and does some animation on the black screen) before the login form undergoes a submit() event. When the submit() is $_POSTed, the credentials are validated and header() is used to redirect to 'home.php'. This animation is then "continued" (black color plus animation) as home.php loads, and finally the page "appears" after the body has loaded.

The problem is this: in the brief moment that includes the login validation on login.php and the PHP processing in home.php, there is a white flash that I DO NOT want.

Here is the sequence I want: click login button (not black screen) ---> jQuery animation (black screen) ----> form submit (still black screen) ----> $_POST validation (still black screen) ---> header('location: home.php') (still black screen)----> PHP processing (still black screen) ----> jQuery animation (still black screen) ----> page is revealed (not black screen)

Here is the sequence I get: click login button (not black screen) ---> jQuery animation (black screen) ----> form submit (still black screen) ----> $_POST validation (now a white screen) ---> header('location: home.php') (white screen)----> PHP processing (white screen) ----> jQuery animation (now a black screen) ----> page is revealed (not black screen)

To reiterate, during PHP processing, the page flashes white, briefly but noticeably, between black screens.

The file home.php has a massive, intricate block of PHP before the <html> tag, and needs to be kept as is. I am looking for a function that does what I need. I googled "PHP set screen color" and related searches, but I only get hits regarding image colors.

Is there any PHP function that would set the default screen color to black during this flash (PHP processing phase) so that instead of a brief white flash, it is a brief black flash?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 学不会递归,理解不了汉诺塔参数变化
    • ¥15 基于图神经网络的COVID-19药物筛选研究
    • ¥30 软件自定义无线电该怎样使用
    • ¥15 R语言mediation包做中介分析,直接效应和间接效应都很小,为什么?
    • ¥15 Jenkins+k8s部署slave节点offline
    • ¥15 如何实现从tello无人机上获取实时传输的视频流,然后将获取的视频通过yolov5进行检测
    • ¥15 WPF使用Canvas绘制矢量图问题
    • ¥15 用三极管设计一个单管共射放大电路
    • ¥15 孟德尔随机化r语言运行问题
    • ¥15 pyinstaller编译的时候出现No module named 'imp'