简体   繁体   English

如何在html中链接css

[英]How to link css in html

This is my web link https://dcnetwork.xyz .这是我的网页链接https://dcnetwork.xyz Here my CSS is not working i dont know the reason these are my files index.html and style.css在这里我的 CSS 不工作我不知道这些是我的文件 index.html 和 style.css 的原因

在此处输入图像描述 在此处输入图像描述

Html Css HTML样式

the only error I can see is that you didn't close tag (end of the line 4) Just add '>' at the end of the line.我能看到的唯一错误是您没有关闭标签(第 4 行末尾)只需在行尾添加“>”即可。

CSS file loads and works correctly for me. CSS 文件加载并为我正常工作。

If you cannot see the CSS changes - sometimes it helps to do hard refresh/reload:如果您看不到 CSS 更改 - 有时它有助于进行硬刷新/重新加载:

  • Chrome, Firefox, or Edge for Windows: Press Ctrl+F5 (If that doesn't work, try Shift+F5 or Ctrl+Shift+R). Chrome、Firefox 或 Windows 的 Edge:按 Ctrl+F5(如果不起作用,请尝试 Shift+F5 或 Ctrl+Shift+R)。
  • Chrome or Firefox for Mac: Press Shift+Command+R.适用于 Mac 的 Chrome 或 Firefox:按 Shift+Command+R。

we have to simply write <link r el="stylesheet" href="" in head section only showing in below我们只需要在标题部分简单地写 <link r el="stylesheet" href="" 仅在下面显示

<!DOCTYPE html>
<html>
  <head>
  <link r e l=" s t l y e sheet" h r e f="styles.css">
  <title>Movie Booking</title>
  </head>
</html>

here "styles.css" is file of css containing css properties这里“styles.css”是包含 css 属性的 css 文件

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

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