react-floating
Version:
Floating React component
97 lines (79 loc) • 1.52 kB
HTML
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>React Floating demo</title>
<style>
html, body, #root {
display: block;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
position: relative;
}
.bg {
position: absolute;
width: 100%;
height: 100%;
background-image: url("http://i.imgur.com/iFJnFGA.jpg");
background-size: cover;
background-position: center;
}
.meteor-1 {
max-width: 340px;
position: absolute;
top: 20%;
right: 20%;
left: 20%;
}
.meteor-1 img {
max-width: 100%;
}
.meteor-2 {
max-width: 300px;
position: absolute;
top: 5%;
right: 30%;
left: 30%;
}
.meteor-2 img {
max-width: 100%;
}
.meteor-3 {
max-width: 400px;
position: absolute;
top: 40%;
right: 40%;
left: 40%;
}
.meteor-3 img {
max-width: 100%;
}
.msg {
width: 400px;
height: 150px;
margin-left: -200px;
margin-top: -65px;
position: absolute;
left: 50%;
top: 50%;
font-family: 'Arial', 'Helvetica', sans-serif;
font-size: 56px;
font-weight: bold;
text-align: center;
color: #fff;
}
.msg p {
margin: 0;
}
</style>
</head>
<body>
<div id="root">
</div>
<script type="text/javascript" src="../../dist/demo/build.min.js"></script></body>
</html>