complete bottom type logic, and perfect the resize event