ccs
ccs
  • 发布:2016-01-17 01:46
  • 更新:2016-01-17 01:46
  • 阅读:1291

关于popover居中向上弹出时左边距多加了5px的问题

分类:MUI

在官方范例中,popover在当向上弹出的时候,箭头位置的左边距多加了5px,这个5px在这里:

var defaultPadding = popover.classList.contains(CLASS_ACTION_POPOVER) ? 0 : 5;

if (arrow) {
if (position === 'top') {
arrow.classList.add(CLASS_BOTTOM);
} else {
arrow.classList.remove(CLASS_BOTTOM);
}
diff = diff - pLeft;
arrowLeft = (pWidth / 2 - arrowSize / 2 + diff);
arrowLeft = Math.max(Math.min(arrowLeft, pWidth - arrowSize * 2 - 6), 6);
arrow.setAttribute('style', 'left:' + arrowLeft + 'px');
}

希望你们能看到
1)加强测试
2)提升设计的全局性

2016-01-17 01:46 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复