有人可以解释为什么我的链接不起作用吗?
<!-- Optional theme this one is ok -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
Run Code Online (Sandbox Code Playgroud)
<button type="button" class="btn btn-primary" href="#">Get your Free Quote now!</button>
Run Code Online (Sandbox Code Playgroud)
我的CSS:
.sec-hover :hover {background:pink;}
我的div:<div class="sec-hover"><h2>heading</h2><p>paragraph</p></div>
使用此代码,整个 div 不会悬停在粉红色。悬停时 h2 和 p 元素分别悬停在粉红色上。如何让整个 div 悬停粉红色?
代码笔:[1]:http ://codepen.io/cboy/pen/GWgOGa