fadeIn()函数能用在onmouseover事件里面吗
2个回答
展开全部
onmouseover是js的吧,jq没这方法。JQ倒是有on("mouseover",function(){})
<style>
.box{
width: 300px;height: 300px;
background: red;
}
.box>div{
width: 100px;height: 100px;
background: green;
display: none;
}
</style>
</head>
<body>
<div class="box">
<div></div>
</div>
</body>
<script type="text/javascript" src="js/jquery-2.1.4.js" ></script>
<script>
$(".box").on("mouseover",function(){
$(this).children("div").fadeIn()
})
</script>
<style>
.box{
width: 300px;height: 300px;
background: red;
}
.box>div{
width: 100px;height: 100px;
background: green;
display: none;
}
</style>
</head>
<body>
<div class="box">
<div></div>
</div>
</body>
<script type="text/javascript" src="js/jquery-2.1.4.js" ></script>
<script>
$(".box").on("mouseover",function(){
$(this).children("div").fadeIn()
})
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询