React/TodoList
# React Project - TodoList ## Description * 하루목표를 작성하고 관리할 수 있는 웹서비스 구...
import './App.css';
import React, {useState} from 'react';
export default function App() {
const [x, setX] = useState();
const [y, setY] = useState(); //초기값은 0으로 설정
return(
<div className = 'container' onPointerMove={(event) =>
{
setX(event.clientX);
setY(event.clientY);
}}>
<div className = 'pointer' style={{transform: `translate(${x}px, ${y}px)`}} />
</div>
)
}
.container {
width: 100vw;
height: 100vh;
}
.pointer {
position: absolute;
background-color: salmon;
border-radius: 50%;
width: 25px;
height: 25px;
left: -15px;
top: -15px;
}
Avenco comes with a built-in contact form.