亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Php 包含標題未在某些機器上顯示

Php 包含標題未在某些機器上顯示

PHP
藍山帝景 2021-12-03 19:09:06
所以我在單獨的文件中有一個頁眉和頁腳,我通過 php include 方法包含它們。在我的機器上,它適用于 chrome 和 edge。當我轉到另一臺電腦時,它可以在 chrome 上運行,但不能在 edge 上運行?,F在,當它沒有加載時,它實際上加載了,但之后直接消失了。它僅在屏幕上短暫閃爍。我的文件結構如下:2.10.0  index.php  assets     headernav.php在我的 index.php 文件中,我使用此代碼來包含。<?php include("assets/headernav.php"); ?>它包含的headernav.php文件如下<script>        function openmen() {            document.getElementById("menu").style.marginLeft = "0";            document.getElementById('menubtn').setAttribute("onClick", "closemen()");      document.getElementById("content").style.paddingLeft = "250px";      document.getElementById("searchbox").style.left = "240px";        }        function closemen() {            document.getElementById("menu").style.marginLeft = "-230px";            document.getElementById('menubtn').setAttribute("onClick", "openmen()");      document.getElementById("content").style.paddingLeft = "20px";      document.getElementById("searchbox").style.left = "10px";    }    function opensettings() {            document.getElementById("settings").style.display = "block";    }    function closesettings() {            document.getElementById("settings").style.display = "none";    }    </script><settings_background id="settings"><settings><h2>Instellingen</h2><i id="closebtn" onclick="closesettings()"  class="fas fa-times"></i>所以總而言之,我包含的 headernav 文件在某些機器上使用 php 工作,而在其他機器上則直接加載和消失。
查看完整描述

1 回答

?
慕無忌1623718

TA貢獻1744條經驗 獲得超4個贊

所以我找到了一個解決方案......終于。

原來有 position:fixed 的 header 總是需要 top:0;和 left:0;,即使標題已經在正確的位置。


查看完整回答
反對 回復 2021-12-03
  • 1 回答
  • 0 關注
  • 221 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號