情報
大学生・専門学校生・社会人
解決済み

cssとJavaScriptってどこに入れればいいんですか?
これはそもそも可能ではないんでしょうか??

<html>
<head>
<title>clear note</title>
</head>
<body> <br><br>
<center><I><h1 class="title">
<span>T</span>
<span>E</span>
<span>X</span>
<span>T</span>
<span>&nbsp;</span>
<span>A</span>
<span>N</span>
<span>I</span>
<span>M</span>
<span>A</span>
<span>T</span>
<span>I</span>
<span>O</span>
<span>N</span>
</h1><I></center>
</body>
</html>

[JavaScript]

const CLASSNAME = "-visible";
const TIMEOUT = 1500;
const $target = $(".title");

setInterval(() => {
$target.addClass(CLASSNAME);
setTimeout(() => {
$target.removeClass(CLASSNAME);
}, TIMEOUT);
}, TIMEOUT * 2);

@import url('https://fonts.googleapis.com/ CSS2?family=Josefin+Sans&display%=swap"); .title { display: flex; overflow: hidden; color:#aa8f7b; font-family: Josefin Sans', sans-serif; .title span { display: block; transform: translate(0, 105%); transition: transform cubic-bezier(0.215, 0.61, 0.355, 1) 0.5s; m .title.-visible span { transform: translate(0, 0); .title span:nth-child(2) { transition-delay: 0.06s; CSS
m .title span:nth-child(3) { transition-delay: 0.12s; .title span:nth-child(4) { transition-delay: 0.18s%; m .title span:nth-child(5) { transition-delay: 0.24s; .title span:nth-child(6) { transition-delay: 0.30s; .title span:nth-child(7) { transition-delay: 0.36s; .title span:nth-child(8) { transition-delay: 0.42s%; .title span:nth-child(9) { transition-delay: 0.48s%; .title span:nth-child(10) { transition-delay: 0.54s; CSS
.title span:nth-child(11) { transition-delay: 0.6s; .title span:nth-child(12) { transition-delay: 0.66s%; m .title span:nth-child(13) { transition-delay: 0.72s%; .title span:nth-child(14) { transition-delay: 0.78s; Base style. / body { display: flex; height: 100vh; justify-content: center; align-items: center; margin: 0; CSS
css javascript js html

回答

✨ ベストアンサー ✨

可能ですよ。
ただ、HTML内にCSSやjavascriptのファイルを呼び出す文言が必要になります。

<link rel="stylesheet" href="sample.css">
のような文字列です。

CSSやjavascriptのファイルはHTMLで指定した階層内に入れます。
通常、HTMLフォルダとCSSフォルダ、javascriptフォルダ、その他画像などのフォルダを同じ階層に置きます。

花琳

ありがとうございます〜!!
それで試してみます!

この回答にコメントする

回答

疑問は解決しましたか?

この質問を見ている人は
こちらの質問も見ています😉