Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/91.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript CSS线性渐变不在Chrome、Safari中显示_Javascript_Html_Css_Linear Gradients - Fatal编程技术网

Javascript CSS线性渐变不在Chrome、Safari中显示

Javascript CSS线性渐变不在Chrome、Safari中显示,javascript,html,css,linear-gradients,Javascript,Html,Css,Linear Gradients,我在Html中加载CSS文件,如下所示: <head> <title>H e a d s p a c e</title> <style> <link rel="stylesheet" href="styles.css" type = "text/css"> </style> </head> 然而,它实际上并没有显示任何内容。背景是白色的。在无数次浏览了其他sta

我在Html中加载CSS文件,如下所示:

<head>
<title>H e a d s p a c e</title>
<style>
        <link rel="stylesheet" href="styles.css" type = "text/css">

        </style>
        </head>
然而,它实际上并没有显示任何内容。背景是白色的。在无数次浏览了其他stackoverflow/在线论坛后,我很无助——有什么问题吗


这两个文件都位于同一服务器上的同一目录中。非常感谢您的帮助

不要将指向样式表的链接放在样式标记中

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

应该是这样的。
您的代码在其他方面工作正常。

CSS看起来不错。你能发布你的文件夹结构吗?我只是把index.html文件和styles.css都放在我的服务器上的同一个公共html文件夹中。我开始怀疑这是否是html中的three.js代码,尽管我确实正确地设置了渲染器
renderer=new THREE.WebGLRenderer({alpha:true});renderer.setClearColor(0x000000,0)所以我完全迷路了。
<head>
<link rel="stylesheet" href="styles.css" type = "text/css">
</head>