慕运维0565702
2019-12-16 17:00
<script src="js/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
$(()=>{
console.log('页面元素加载完执行');
var outerWidth = 600,
outerHeight = 400;
var $marquee = $('.marquee');
var $content = $marquee.find('.content');
var $ig = $content.find('.ig');
var igLength = $ig.length;
var contentWidth = outerWidth*igLength;
$marquee.css({
"width":'${outerWidth}px',
"height":'${outerHeight}px'
});
$ig.css({
"width":'${outerWidth}px',
"height":'${outerHeight}px'
});
$content.css({
"width":'${contentWidth}px',
"height":'${outerHeight}px'
});
})
</script>求大佬指点,谢谢
https://github.com/linrufeng/animation.git
代码不放全,叫人怎么帮你看?
估计是你的模板字符串用错了
// 模板字符串是反引号 ``
`${变量或者表达式}`带你走入前端动画的世界
29785 学习 · 65 问题
相似问题