将鼠标悬停在链接上更改背景图片

时间:2018-09-19 14:43:29

标签: html css

我正在尝试将鼠标悬停在链接上,以使用相邻兄弟选择器更改div中的图像,但是当我将鼠标悬停在链接上时,它什么都不显示。

public function AddQuestion(Request $request){

       $newQuestion = new Forum() ;

       $newQuestion->Title_Forum = $request->input('Title_Forum');

       $newQuestion->Text_Forum =  $request->input('Text_Forum') ;

       $newQuestion->Statu_Forum = "test" ;

       $newQuestion->BestComment_Forum = 1 ;

       $newQuestion->save();


       $getQuestions = Forum::orderBy('created_at','desc')->paginate(10);

       return response()->json($getQuestions) ;

}

CSS:

<!DOCTYPE HTML>
<html>
<head>

<link rel="stylesheet" href="styletest.css">    
</head>
<body>
<div>

    <a class="a" href="/template-1978944/editor"> ANATOMY NOW
    </a>

    <div class="bg"> </div>

</div>   
</body>
</html>

1 个答案:

答案 0 :(得分:1)

如果您需要填充视口的背景,也可以使用height:100vh;