<link rel="stylesheet" th:href="@{dist/css/animate.css}"><!-- 动画效果 -->
<!--mind 中间内容-->
<div id="mainContentId" >
</div>
<script>//加载+动画
function doLoadUrl(url) {
$('#mainContentId').load(url);
animateCSS('#mainContentId', 'lightSpeedIn');
} ;
function animateCSS(element, animationName, callback) {
const node = document.querySelector(element)
node.classList.add('animated', animationName)
function handleAnimationEnd() {
node.classList.remove('animated', animationName)
node.removeEventListener('animationend', handleAnimationEnd)
if (typeof callback === 'function') callback()
}
node.addEventListener('animationend', handleAnimationEnd)
}
animateCSS('#mainContentId', 'lightSpeedIn');
</script>
LawssssCat
发布了296 篇原创文章 · 获赞 61 · 访问量 7060
私信
关注