0

style="" を使用するのと同じように、html ファイルで css のホバーを使用する方法を探しています。どなたか詳しい方回答お願いします。別の css ファイルまたは javascript を使用することはできません。

4

1 に答える 1

2

you cannot simply specify hover inline instead you can write css code inside your html file and assign a class name to it and give the class name to your desired element:

<html>
<head>
<style>
.myClass{
color:red;
}
.myClass:hover{
color:blue;
}
</style>
</head>
<body></body>
</html>
于 2013-10-01T16:12:36.833 に答える