그래서 html 파일이 내 배경을 그라디언트로 표시하려고합니다. 예를 들어, 다음과 같이 : http://uigradients.com/# 그러나 내 스타일 시트가 내 HTML 파일에 연결되어 있지 않아서 내 글꼴이 작동하지 않을뿐만 아니라 내 그라디언트도 아닙니다.내 스타일 시트가 내 HTML 파일에 연결되지 않는 이유는 무엇입니까?
본질적으로, 여기에 내 인덱스 파일이 엉망이되기 전에 보이는 것입니다 : http://crwirth.github.io 그리고 본질적으로 내가하려는 것은 배경을 그라데이션으로 만드는 것입니다. 여기
내 HTML 파일입니다<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" type="text/css" href="index.css" media="screen">
</head>
<!--–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<body>
<div class="element">
<h1><a id="line1" class="categories" title="shortblurb1" font-family="'Lobster', cursive" font-weight="normal" text-align="left" ;>Welcome, I hope you enjoy everything you encounter here:</a></h1>
<h2><a id="line2" class="categories" href="https://github.com/crwirth" title="shortblurb2" font-family="'Lobster', cursive" font-weight="normal" text-align="left" ;>My GitHub</a></h2>
<h2><a id="line2" class="categories" href="https://wirthrcody.wordpress.com/" title="shortblurb2" font-family="'Lobster', cursive" font-weight="normal" text-align="left" ;>My Blog</a></h2>
<h4><a id="line5" class="categories" href="https://twitter.com/codyrwirth" title="shortblurb5" font-family="'Lobster', cursive" font-weight="normal" text-align="left" ;>Follow me on Twitter</a></h4>
<h5><a id="line6" class="categories" href="https://www.linkedin.com/in/wirthcodyr"title="shortblurb6" font-family="'Lobster', cursive" font-weight="normal" text-align="left" ;>Connect with me on LinkedIn</a></5>
<style>
</style>
</div>
</body>
</html>
좋아, 여기 내 CSS 파일입니다, 귀하의 질문에 여기
background: #ee0979; /* fallback for old browsers */
background: -webkit-linear-gradient(to left, #ee0979 , #ff6a00); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to left, #ee0979 , #ff6a00); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
html {
background-color: #ee0979;
}
a {
color: black;
text-decoration: none;
font-family: "Lobster", cursive;
text-align: left;
}
h1 {
color: black;
font-family: "Lobster", cursive;
font-size: 1.9em;
text-align: left;
margin-left: 15px;
margin-top: 20px;
padding-left: 60px;
padding-top: 10px;
padding-bottom: 25px;
}
a:hover {
text-decoration: underline;
}
a {
color: black;
font-family: "Lobster", cursive;
font-size: 3.1em;
text-align: left;
padding-left: 40px;
padding-top: 15px;
padding-bottom: 15px;
}
동일한 디렉토리에 있습니까? – ImAtWar
@ImAtWar가 말한대로 디렉토리 구조를 확인하십시오 (심지어 게시 할 수도 있음). 또한 인라인 (즉 HTML) 스타일을 사용하지 마십시오. 코드를 읽을 수 없게 만들고, 복제가 까다로 우며 나중에 수정하기가 어렵습니다. – Jack