Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
当前面重叠向左边移动.但左边也有重叠时该怎么写.如何判断前面左边和右边的重叠.当判断前面左边有重叠往右边移动.判断前面右边有重叠往左边移动.
用子事件+否则条件来构造对各种情况判断的优先级即可,例如按你的描述,前面是否重叠的优先级最大,最先判断,然后才判断左边,最后才判断右边,则条件的结构可以像下面这么写,你按自己的实际情况来改即可: 顺带贴一下“否则”这个条件的用法官方是怎么说明的: