我用js对css做的一个样式进行了简单的移动效果实现,但在手机上会移出手机屏幕,
如何解决这个问题呢?谢谢!
关于css动画效果移动问题(手机屏幕适配问题)
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
6条回答 默认 最新
- Runing_snailLBNL 2016-11-08 01:32关注
{
xtype: 'button',
text: '',
iconCls: 'plus white',
cls: 'newBtn',
ui: 'action',
action: 'new'
,
draggable:{
direction: 'both',
initialOffset: { x: window.innerWidth - 20 - window.innerWidth / 2, y: window.innerHeight },
constraint: {
min: { x: 0, y: 0 },
max: { x: window.innerWidth - 50, y: window.innerHeight - 110}
}
}
}
这是一个可移动的button且不会移出屏幕,你可以模仿着实现你的拖动不移出屏幕。解决 无用评论 打赏 举报