gpt4 book ai didi

html - 带有 chrome 的外部样式表

转载 作者:行者123 更新时间:2023-11-28 04:46:43 25 4
gpt4 key购买 nike

好的,第一次提问,我在 chrome 浏览器中使用外部样式表时遇到问题,而在使用 Edge 和 Firefox 时不会出现。它在 Jsfiddle 中也能正常工作。问题是它在我的正文中不显示背景或文本颜色,但对于标题,它工作得很好。

这是我第一次使用外部样式表,但我认为因为它在其他浏览器中工作,所以这是与 chrome 的兼容性问题。

我像这样链接 CSS 文件:

<link rel="stylesheet" type="text/css" href="styles.css" />

这是我的 CSS 代码本身:

body {
background-color: Black;
color: Green;
font-family: verdana;
}

h1 {
text-align: center;
}

ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: Green;
}

li {
float: left;
border-right:1px solid #bbb;
}

li:last-child {
border-right: none;
}

li a {
display: block;
color: Black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}

li a:hover:not(.active) {
background-color: #111;
}

.active {
background-color: green;
}

提前感谢您提供的任何帮助,这是一个具有严格标准的学校式元素,这就是为什么它需要外部和 chrome。

最佳答案

  • 转到设置
  • 搜索缓存
  • 清除浏览数据
  • 检查缓存的图像和文件(过去一小时/一天)
  • 清除浏览数据

然后转到您的网页并按“Ctrl + r”

希望对您有所帮助!

关于html - 带有 chrome 的外部样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40921924/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com