×

基于jquery的代码显示区域自动拉长效果

作者:Terry2017.02.07来源:Web前端之家浏览:9389评论:0
关键词:JQueryJS
下面是jquery的实现代码:
复制代码 代码如下:

$(document).ready(function(){

$('pre').hover(
function(){
if($(this).width()==520){
$(this).animate({width:'800'},400);
$(this).css({border:'1px solid #2B99E6'});
}
},
function(){
if($(this).width()==800){
$(this).animate({width:'520'},400);
$(this).css({border:'1px solid #555555'});
}
}
);

您的支持是我们创作的动力!
温馨提示:本文作者系Terry ,经Web前端之家编辑修改或补充,转载请注明出处和本文链接:
https://jiangweishan.com/article/svg1486396800916.html

网友评论文明上网理性发言已有0人参与

发表评论: