2
このコードを実行すると、何も表示されません。しかしcodecademyでは、うまくいくようです。私はそれがリンクか何かと関係があるかどうか分からないが、助けてください。答えは明らかかもしれませんが、私は初心者ですので、私は助けが必要です。ここではHTMLは次のとおりです。ここでCSSリンクが動作していないか何か
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="C:\Users\Cohrs Kids\Desktop\menu.css"/>
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<div id= "one"></div>
<div id= "two"></div>
<div id= "back"></div>
<div id= "createone"></div>
<div id= "createtwo"></div>
<div id= "delete"></div>
</body>
</html>
はCSSです:
body {
height: 100%
}
#one {
height: 50%;
background-color: blue;
width: 15%;
position: relative;
left:20%;
top:25%;
}
#two{
height: 50%;
background-color: blue;
width: 15%;
position: relative;
left:60%;
bottom:23%;
}
#back{
background-color: red;
height: 10%;
width: 15%;
position: relative;
bottom: 95%;
}
#createone{
background-color: #99ffff;
height: 10%;
width: 15%;
position: relative;
bottom: 52%;
left: 20%;
}
#createtwo{
background-color: #99ffff;
height: 10%;
width: 15%;
position: relative;
bottom: 60%;
left: 60%;
}
#delete{
background-color: red;
height: 9%;
width: 6%;
position: relative;
left: 29%;
bottom:61.5%;
}
パスを確認しましたか?パスを見ると、なぜそれがうまくいかないのか分かります。リンクへの相対パスを指定します。 – Li357
あなたはhrefをC:\にすることはできません。あなたはウェブディレクトリからホストする必要があります – Kosch
それはうまくいきませんでした。 –