首页 > 语言 > JavaScript > 正文

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

2024-05-06 14:22:57
字体:
来源:转载
供稿:网友
下面是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'});
}
}
);
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选