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>
posted @ 2025-02-11 00:11  再报错就堵桥0  阅读(12)  评论(0)    收藏  举报