我已经编写了一些代码来使文本发光,但是文本不仅会在光标位于文本上方时发光,而且还会在光标位于由文本扩展的水平区域上方时发光。为什么会发生这种情况,我怎样才能使它仅在光标位于文本上方时发光?
<!DOCTYPE html>
<html>
<head>
<title>tTEXT</title>
</head>
<link rel="stylesheet" type="text/css" href="styles.css"/>
<body>
<style>
@font-face
{
font-family: ralewaythin;
src: url('Cantarell-Regular.ttf')
}
.backgroundimage
{
background-position: center;
}
.text-glow-hover-with-delay
{
color: black;
-webkit-transition: text-shadow 0.15s;
}
.text-glow-hover-with-delay:hover
{
text-shadow: 0 0 10px #4682b4;
}
.head
{
font-family: ralewaythin;
color: black;
font-size: 75px;
-webkit-text-stroke: 1px;
}
</style>
<div class="text-glow-hover-with-delay">
<div class="head">TEXT</div>
</div>
</body>
</html>