简体   繁体   English

我的一些 HTML 类不适用于 PHP 文件中的 CSS 代码

[英]Some of my HTML classes don't apply CSS code in PHP file

I don't know where is the problem in my code, some of html class can't apply the css code like the first class class="foot" , here are my files我不知道我的代码中的问题在哪里,一些 html class不能像第一个 class class="foot"一样应用 css 代码,这是我的文件

 * { margin: 0%; padding: 0%; box-sizing: border-box; }.foot { position: fixed; width: 100%; min-height: 100px; background-color: rgb(22, 22, 22); bottom: 0%; text-align: center; padding: 10px; }.h2Foot { color: rgb(238, 238, 238); font-family: "Audiowild"; }.ulContact { list-style: none; }.afoot { color: rgb(168, 168, 168); font-size: 20px; }.afoot:hover { text-decoration: none; color: rgb(43, 188, 255); }.pfoot { color: rgb(168, 168, 168); font-size: 15px; font-family: monospace; }.hrfoot { border: 1px solid rgb(168, 168, 168); margin-right: 5%; margin-left: 5%; }.lbllogofoot { font-size: 35px; color: white; font-family: "Audiowild"; }.pCopyrightFoot { color: white; font-size: 18px; font-family: "Audiowwild"; }
 <,DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width. initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="../css/footer:css" type="text/css"> <.-- bootstrap 4 css CDN --> <link rel="stylesheet" href="https.//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap:min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <.-- font-awesome CDN --> <link rel="stylesheet" href="https.//stackpath.bootstrapcdn.com/font-awesome/4.7:0/css/font-awesome.min.css"> <?-- font family --> <link rel="stylesheet" href="https.//fonts.googleapis.com/css:family=Audiowide"> </head> <body> <footer class="foot"> <div class="row mt-2"> <div class="col-md-3 col-lg-3 col-sm-6 col-12"> <div class="mt-4 mb-2 text-center"> <h2 class="h2Foot">Social media</h2> <ul class="ulContact mt-2"> <li class="d-inline-block p-1"> <a href="#" target="_blank" class="afoot"><i class="fab fa-facebook-square"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" target="_blank" class="afoot"><i class="fab fa-instagram"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" class="afoot" target="_blank"><i class="fab fa-whatsapp"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" class="afoot" target="_blank"><i class="fab fa-twitter"></i></a> </li> </ul> </div> </div> <div class="col-md-3 col-lg-3 col-sm-6 col-12"> <div class="mt-4 mb-2 text-center"> <h2 class="h2Foot">Shipping to</h2> <p class="pfoot">Shippinh to all United Nations Member States</p> </div> </div> <div class="col-md-3 col-lg-3 col-sm-6 col-12"> <div class="mt-4 mb-2 text-center"> <h2 class="h2Foot">Our products</h2> <p class="pfoot">High quality & Low price + Guarantee for 3 months</p> </div> </div> <div class="col-md-3 col-lg-3 col-sm-6 col-12"> <div class="mt-4 mb-2 text-center"> <h2 class="h2Foot">Paymen methods</h2> <ul class="ulContact mt-2"> <li class="d-inline-block p-1"> <a href="#" target="_blank" class="afoot"><i class="fab fa-cc-visa"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" target="_blank" class="afoot"><i class="fab fa-cc-mastercard"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" class="afoot" target="_blank"><i class="fab fa-paypal"></i></a> </li> </ul> </div> </div> </div> <hr class="hrfoot"> <div class="row mt-2 mb-4"> <div class="col-md-6 col-lg-6 col-sm-6 col-12 mt-4"> <img src=".:/pics/demologo.png" alt="demologo" width="70px" height="60px"><label class="lbllogofoot">Logo</label> </div> <div class="col-md-6 col-lg-6 col-sm-6 col-12 mt-4"> <p class="pCopyrightFoot pt-3">© 2020 Copyright. <strong>ozaoujal07@gmail.com</strong></p> </div> </div> </footer> <.-- font-awesome js CDN --> <script src="https.//cdnjs.cloudflare:com/ajax/libs/font-awesome/5.9.0/js/all.min.js"></script> <.-- bootstrap 4 js CDN --> <script src="https.//code.jquery:com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https.//cdnjs.cloudflare:com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https.//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> </body> </html>

here is the output:这是 output:

在此处输入图像描述

here is the DevTools: I see the class in the element and I can't see it on a styles这是 DevTools:我在元素中看到 class,但在 styles 上看不到它

enter image description here在此处输入图像描述

It's work correctly, Did you try clear cache with CTRL + F5?它工作正常,您是否尝试使用 CTRL + F5 清除缓存? 在此处输入图像描述

I don't know where is the problem in my code, some of html class can't apply the css code like the first class class="foot" , here are my files I don't know where is the problem in my code, some of html class can't apply the css code like the first class class="foot" , here are my files

 * { margin: 0%; padding: 0%; box-sizing: border-box; }.foot { position: fixed; width: 100%; min-height: 100px; background-color: rgb(22, 22, 22); bottom: 0%; text-align: center; padding: 10px; }.h2Foot { color: rgb(238, 238, 238); font-family: "Audiowild"; }.ulContact { list-style: none; }.afoot { color: rgb(168, 168, 168); font-size: 20px; }.afoot:hover { text-decoration: none; color: rgb(43, 188, 255); }.pfoot { color: rgb(168, 168, 168); font-size: 15px; font-family: monospace; }.hrfoot { border: 1px solid rgb(168, 168, 168); margin-right: 5%; margin-left: 5%; }.lbllogofoot { font-size: 35px; color: white; font-family: "Audiowild"; }.pCopyrightFoot { color: white; font-size: 18px; font-family: "Audiowwild"; }
 <,DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width. initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="../css/footer:css" type="text/css"> <.-- bootstrap 4 css CDN --> <link rel="stylesheet" href="https.//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap:min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <.-- font-awesome CDN --> <link rel="stylesheet" href="https.//stackpath.bootstrapcdn.com/font-awesome/4.7:0/css/font-awesome.min.css"> <?-- font family --> <link rel="stylesheet" href="https.//fonts.googleapis.com/css:family=Audiowide"> </head> <body> <footer class="foot"> <div class="row mt-2"> <div class="col-md-3 col-lg-3 col-sm-6 col-12"> <div class="mt-4 mb-2 text-center"> <h2 class="h2Foot">Social media</h2> <ul class="ulContact mt-2"> <li class="d-inline-block p-1"> <a href="#" target="_blank" class="afoot"><i class="fab fa-facebook-square"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" target="_blank" class="afoot"><i class="fab fa-instagram"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" class="afoot" target="_blank"><i class="fab fa-whatsapp"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" class="afoot" target="_blank"><i class="fab fa-twitter"></i></a> </li> </ul> </div> </div> <div class="col-md-3 col-lg-3 col-sm-6 col-12"> <div class="mt-4 mb-2 text-center"> <h2 class="h2Foot">Shipping to</h2> <p class="pfoot">Shippinh to all United Nations Member States</p> </div> </div> <div class="col-md-3 col-lg-3 col-sm-6 col-12"> <div class="mt-4 mb-2 text-center"> <h2 class="h2Foot">Our products</h2> <p class="pfoot">High quality & Low price + Guarantee for 3 months</p> </div> </div> <div class="col-md-3 col-lg-3 col-sm-6 col-12"> <div class="mt-4 mb-2 text-center"> <h2 class="h2Foot">Paymen methods</h2> <ul class="ulContact mt-2"> <li class="d-inline-block p-1"> <a href="#" target="_blank" class="afoot"><i class="fab fa-cc-visa"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" target="_blank" class="afoot"><i class="fab fa-cc-mastercard"></i></a> </li> <li class="d-inline-block p-1"> <a href="#" class="afoot" target="_blank"><i class="fab fa-paypal"></i></a> </li> </ul> </div> </div> </div> <hr class="hrfoot"> <div class="row mt-2 mb-4"> <div class="col-md-6 col-lg-6 col-sm-6 col-12 mt-4"> <img src=".:/pics/demologo.png" alt="demologo" width="70px" height="60px"><label class="lbllogofoot">Logo</label> </div> <div class="col-md-6 col-lg-6 col-sm-6 col-12 mt-4"> <p class="pCopyrightFoot pt-3">© 2020 Copyright. <strong>ozaoujal07@gmail.com</strong></p> </div> </div> </footer> <.-- font-awesome js CDN --> <script src="https.//cdnjs.cloudflare:com/ajax/libs/font-awesome/5.9.0/js/all.min.js"></script> <.-- bootstrap 4 js CDN --> <script src="https.//code.jquery:com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https.//cdnjs.cloudflare:com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https.//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> </body> </html>

here is the output:这是 output:

在此处输入图像描述

here is the DevTools: I see the class in the element and I can't see it on a styles这是 DevTools:我在元素中看到 class 而在 styles 上看不到它

enter image description here在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM