2.10 安卓项目界面布局
今天完成了安卓作业的第一个页面的布局

今天学习了css的平移滚动,测试代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>flexbox</title>
<style>
.flex-scroll {
display: flex;
width: 300px;
overflow-x: auto;
scroll-snap-type: x mandatory;
}
.flex-scroll div {
width: 200px;
height: 150px;
margin-right: 10px;
background-color: #f0f0f0;
scroll-snap-align: start;
}
</style>
</head>
<body>
<div class="flex-scroll">
<div>Hello</div>
<div>World</div>
<div>内容</div>
</div>
</body>
</html>

浙公网安备 33010602011771号