react 瀑布流

news/2024/7/15 18:36:01 标签: react.js, javascript, 前端

app.js

import React from 'react'
import icon from "../src/icon/国旗.webp"
import icon1 from "../src/icon/勿忘国耻.webp"
import icon2 from "../src/icon/国旗.webp"
import icon3 from "../src/icon/天安门.webp"
import Draggable from 'react-draggable';
export default function ZhiDing() {
  return (
    <div>
      <div style={{ position: 'fixed', top: '0', width: '100%' }}>
        < img src={icon} alt="" style={{ width: '500px', height: 'auto'}} />

      </div>
      < img src={icon1} alt="" style={{ width: '500px', height: 'auto' }} />
      < img src={icon} alt="" style={{ width: '500px', height: 'auto' }} />
      < img src={icon1} alt="" style={{ width: '500px', height: 'auto' }} />
      < img src={icon2} alt="" style={{ width: '500px', height: 'auto' }} />
      < img src={icon3} alt="" style={{ width: '500px', height: 'auto' }} />
      < img src={icon} alt="" style={{ width: '500px', height: 'auto' }} />
      < img src={icon1} alt="" style={{ width: '500px', height: 'auto' }} />
      <Draggable bounds={{ right: 1500, left: 0, top: 0, bottom: 500 }} >
        < img src={icon} alt="" style={{ width: '100%', height: 'auto' }} />
        {/* < img src={icon1} alt="" style={{ width: '100%', height: 'auto' }} />
        < img src={icon2} alt="" style={{ width: '100%', height: 'auto' }} />
        < img src={icon3} alt="" style={{ width: '100%', height: 'auto' }} /> */}
      </Draggable>
    </div>
  )
}

// import React, { Component } from 'react'
// import icon from "../src/icon/壁纸.jpg"
// export default class App extends Component {
//   render() {
//     return (
//       <div className="rr">
//       <div>
//         {/* 瀑布流 */}
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//         <img src={icon} style={{display:"inline-block", width:"350px",height:"350px"}}/>
//       </div>  
//     </div>
//     )
//   }
// }

app.css

*{
  margin: 0;
  padding: 0;
}
div{
  width: 150px;
  position: absolute;
  border: 1px solid;
}
img{
  display: inline-block;
  width: 150px;
}
#wrap{
  position: relative;
  width: 100%;
}

http://www.niftyadmin.cn/n/5018680.html

相关文章

金蝶云星空和四化智造MES(WEB)单据接口对接

金蝶云星空和四化智造MES&#xff08;WEB&#xff09;单据接口对接 接入系统&#xff1a;四化智造MES&#xff08;WEB&#xff09; MES建立统一平台上通过物料防错防错、流程防错、生产统计、异常处理、信息采集和全流程追溯等精益生产和精细化管理&#xff0c;帮助企业合理安排…

mac的m1芯片安装nvm踩坑完全版

这里写自定义目录标题 我是按照知乎大神的方法安装的&#xff0c;过程中仍然有坑 首先&#xff1a; 知乎大神的方法安装 踩坑开始&#xff1a; 使用zsh brew一直装不了&#xff08;原因未知&#xff09; .zshrc文件无法创建 mkdir .zshrc 创建成了名为.zshrc 的文件夹而不是文…

Linux入门-网络基础|网络协议|OSI七层模型|TCP/IP五层模型|网络传输基本流程

文章目录 一、网络基础 二、网络协议 1.OSI七层模型 2.TCP/IP五层&#xff08;或四层&#xff09;模型 三、网络传输基本流程 1.网络传输流程图 2.数据包封装和分用 四、网络中的地址管理 1.IP地址 2.MAC地址 一、网络基础 网络发展最初是独立模式&#xff0c;即计算…

D1D2. Candy Party

d1的题意是有n个人每个人都有一定的糖果&#xff0c;同时每个人必须给其他人一次糖果和接收其他人给他的一次糖果&#xff0c;同时给出的糖果和接收的数目都是2^x&#xff0c;最后确保每个人拥有的糖果数目一样 思路&#xff1a;我们可以先由平均数算出每个人最终要拥有的糖果…

演讲笔记|《一个ppt者的成长故事》

前言&#xff1a;本文为《说服力&#xff1a;工作型PPT该这样做》作者、秋叶PPT团队成员秦阳于2017年1月15日在北京望界无界空间的演讲内容要点总结。 1. 结构化思考&#xff08;思考能力&#xff09; 体系&#xff1a;挖多个坑&#xff0c;多个视角&#xff08;构建体系 – 获…

Oracle用户权限管理方法

Oracle 用户权限管理方法&#xff0c;对于想要学习oracle安全的朋友&#xff0c;是个入门级的资料。 sys;//系统管理员&#xff0c;拥有最高权限 密码默认为change_on_install system;//本地管理员&#xff0c;次高权限 密码默认为manager sysman dbsnmp scott;//普通用户…

2023上半年京东运动鞋服市场数据分析(京东数据运营)

大众线下运动生活恢复&#xff0c;掀起新一轮户外潮流&#xff0c;运动热潮迭起。由此产生的运动鞋服及专业装备需求&#xff0c;为运动品牌们带来了诸多增长机会。近日各大运动品牌陆续发布上半年财报&#xff0c;回答了品牌对复苏机遇、发展挑战的应对情况。接下来结合具体数…

恒运资本:多股涨停!“吃药”行情卷土重来;政策利好,元宇宙又可以了!

今日早盘&#xff0c;A股小幅震荡反弹&#xff0c;科创50指数继续围绕900点打开争夺。 盘面上&#xff0c;医药&#xff0c;轿车、元世界、煤炭等板块涨幅居前&#xff0c;航空、家居用品、卫星导航、房地产等板块跌幅居前。北上资金净流出4.4亿元。 医药股全线走强 医药股早…