下面我有我的div的代码固定在页面的右侧,但是我完全不知道如何使其可扩展,所以当它点击它打开直至联系表单。我也想要它戳出一小部分,并阅读免费报价!在浏览器窗口右侧的可扩展固定div
HTML
<div id="slidingpanel"></div>
CSS
#slidingpanel {
position: fixed;
width: 30px;
height: 200px;
z-index: 1;
right: 0px;
}
下面我有我的div的代码固定在页面的右侧,但是我完全不知道如何使其可扩展,所以当它点击它打开直至联系表单。我也想要它戳出一小部分,并阅读免费报价!在浏览器窗口右侧的可扩展固定div
HTML
<div id="slidingpanel"></div>
CSS
#slidingpanel {
position: fixed;
width: 30px;
height: 200px;
z-index: 1;
right: 0px;
}
你不能只是使用animate
?
$("#slidingpanel").on("click",function(e){
e.preventDefault();
$(this).animate({
width: 200
},100);
})
你好,你可以告诉我这一点,因为我已经尝试过没有喜悦:) – user3588919
点击小提琴。当你点击元素时,它将展开。 – Johnston
为什么downvote? – Johnston
http://stackoverflow.com/questions/10781620/toggle-width-with-jquery您可以轻松地回答修改代码。 – sinisake