我想在此页面http://tinyurl.com/nknqlm9上制作一个选定的 div ,我尝试使用 div: active,但不工作,对于此页面,我使用了 iframe 标记。
问问题
77 次
2 回答
0
阅读此评论后:悬停是可以的,但我想在单击后保持悬停状态
拿hover
class
一个做一个新的:
CSS
.active { /*css of the hover */ }
jQuery
$('.btn').on('click', function() {
$(this).addClass('active');
//if you want to toggle it use toggleClass('active') instead of addClass.
});
于 2013-07-03T10:46:24.417 回答
0
div:hover
如果我理解正确,请尝试使用。
于 2013-07-03T10:38:52.690 回答