我試圖使用PHP創建一個動態網站收錄,但我已經遇到了一個問題 - 的<nav>
,<footer>
和<header>
所有後代都忽略了class CSS格式化,但不是特定於類的CSS正在對其生效。例如:CSS類/ ID樣式不被應用於<nav>,<footer>和<header>後代使用PHP
<footer>
此格式不影響要素:
footer section #main-footer-section
{
\t background-color: #444554;
\t height: 50px;
\t width: 100%;
}
<footer>
\t <section id="main-footer-section">
\t </section>
\t <section id="bottom-footer-section">
\t \t <p id="copyright-mark"><?php echo date("Y") ?>©</p>
\t </section>
</footer>
但是,這是影響<footer>
內容:
footer section
{
\t background-color: #444554;
\t height: 50px;
\t width: 100%;
}
<footer>
\t <section id="main-footer-section">
\t </section>
\t <section id="bottom-footer-section">
\t \t <p id="copyright-mark"><?php echo date("Y") ?>©</p>
\t </section>
</footer>
任何人都可以,請告知,如果我做錯了什麼?