|
@@ -8,8 +8,8 @@ import 'https://cdn.staticfile.org/bootstrap/5.1.3/js/bootstrap.min.js';
|
|
|
|
|
|
/**
|
|
|
* 执行动画
|
|
|
+ * @description 如果元素滚动至可视窗口,添加css动效
|
|
|
* @param ele 元素的选择器
|
|
|
- * @description 如果元素滚动至距离底部150px以上,添加css动效
|
|
|
*/
|
|
|
window.showAnimate = function (ele, className) {
|
|
|
//先隐藏元素
|
|
@@ -58,9 +58,9 @@ window.showAnimate = function (ele, className) {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @description 元素滚动至父容器的中间
|
|
|
+ * @description 元素横向滚动至父容器的中间
|
|
|
* @param ele 可以传元素的"event"或者"选择器名称"
|
|
|
- * @fatherEle 滚动父容器的元素
|
|
|
+ * @fatherEle 可滚动的父容器的元素
|
|
|
*/
|
|
|
window.eleToCenter = function (e,fatherEle){
|
|
|
let item = typeof e == 'object'?$(e.target):(e);
|