讓一個view垂直居中
position: 'absolute', right:0, marginBottom: "auto", marginTop:"auto", height:300,垂直居中要給height
同理水平居中,固定的width
position: 'absolute', right:0, marginLeft: "auto", marginRight:"auto", width:300,以上都是靠右居中,請根據情況修改right:0
讓一個view垂直居中
position: 'absolute', right:0, marginBottom: "auto", marginTop:"auto", height:300,垂直居中要給height
同理水平居中,固定的width
position: 'absolute', right:0, marginLeft: "auto", marginRight:"auto", width:300,以上都是靠右居中,請根據情況修改right:0
快捷鍵: command+T https://blog.csdn.net/yu_m_k/article/details/81226390