当我删除这个属性它工作正常,为什么会这样?
这是jquery函数:
$(document).ready(function(){
$('#flogo').click(function(){
window.alert("clicked");
})
});
Run Code Online (Sandbox Code Playgroud)
这是Html代码:
<div id="fblike" class="fixedlogo"><img src="images/likelogo.png" id="flogo" /> </div>
Run Code Online (Sandbox Code Playgroud)
这是css:
.fixedlogo
{
position: fixed; //If i remove this line then jquery is working.
height:50px;
margin-top: -20px;
}
Run Code Online (Sandbox Code Playgroud)