Jquery中实现动画后怎么改变字体

hopperhuang hopperhuang 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

<!DOCTYPE>
<html lang ="en">
<head>
<meta charset = "utf-8" />
<title>For Test</title>
<script src = "script/jquery-3.0.0.js"></script>
<script>
$(document).ready(
function(){
$("div").click(
function(){
$("div").animate({
left:'20em',

opacity:'0.5',
width:'10em',
height:'10em'
},2000,function() {
document.getElmentById("test") .firstChild.nodeValue = "I love you." ;
} ) ;
}
);
}
);
</script>
</head>
<body>
<button type = "button">Cilck me </button>
<p id = "test" class = "test" >Have a try</p>
<p class = "test" > Have a test ,again.</p>
<p class = "test2" >I'm also a para.</p>
<div style="background:#98bf21;height:100px;width:100px;position:absolute;">
</body>
</html>


想执行完这个动画后,该别ID为TEST的段落的文字,开始怎么弄都不行。
大大们教教我要怎么弄吧,我是新手。
...全文
评论 8
收藏 已收藏
分享
返回顶部
hopperhuang
JavaScript 87,983 成员 224,681 内容