项目实战中的布局技巧,垂直居中
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .flex__container { display: flex; background-color: blanchedalmond; border: 1px solid black; width: 500px; height: 500px; justify-content: center; align-items: center; } .flex__item { background-color: cadetblue; border: 1px solid black; width: 300px; height: 300px; } .flex__container1 { display: inline-flex; background-color: blanchedalmond; border: 1px solid black; width: 500px; height: 500px; justify-content: center; align