HTML原始代码如下,如何用Flex语法实现A到B的效果
<!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>
div,p{border:1px black solid;}
div{height:500px;width:400px;display:flex;flex-flow:column wrap;align-items:flex-end;justify-content: flex-start;}
p{width:80px;height:50px;}
#p5{background-color:yellow;}
#p6{background-color:pink;}
</style>
</head>
<body>
<div>
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p id="p5">5</p>
<p id="p6">6</p>
</div>
</body>
</html> div {
height: 500px;
width: 400px;
display: flex;
flex-flow: column wrap-reverse;
align-items: flex-start;
justify-content: flex-start;
} https://www.ruanyifeng.com/blog/2015/07/flex-grammar.html
页:
[1]