import React, { useEffect, useState } from 'react'; import { Anchor, Col, Row } from 'antd'; const style: React.CSSProperties = { height: '30vh', backgroundColor: 'rgba(0, 0, 0, 0.85)', position: 'fixed', top: 0, insetInlineStart: 0, width: '75%', color: '#fff', }; const App: React.FC = () => { const topRef = React.useRef(null); const [targetOffset, setTargetOffset] = useState(); useEffect(() => { setTargetOffset(topRef.current?.clientHeight); }, []); return (
Part 1
Part 2
Part 3
Fixed Top Block
); }; export default App;