Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created August 13, 2022 04:58
Show Gist options
  • Save SarahElson/0bc633bced1ef573a316659fc6728b0b to your computer and use it in GitHub Desktop.
Save SarahElson/0bc633bced1ef573a316659fc6728b0b to your computer and use it in GitHub Desktop.
How To Style And Write CSS In React
export default function App() {
return (
<div
class="relative flex min-h-screen flex-col justify-center overflow-hidden bg-gray-50 py-6 sm:py-12">
<img
src="/img/beams.jpg"
alt=""
className="absolute top-1/2 left-1/2 max-w-none -translate-x-1/2 -translate-y-1/2" width="1308" />
<div
className="relative bg-white w-fit m-auto p-2 shadow-2xl shadow-red-300">
<img
src="https://cdnb.artstation.com/p/assets/images/images/043/120/123/large/wizix-nakamoto-master-full.jpg?1636383169"
className="w-64 h-64 rounded-full"/>
<p className="text-2xl text-center font-bold">Satoshi Nakamoto</p>
<p className="text-xl text-center font-semibold">I found bitcoin</p>
</div>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment