Created
August 13, 2022 03:59
-
-
Save SarahElson/847f198aa897ef361502c7603ad292c3 to your computer and use it in GitHub Desktop.
How To Style And Write CSS In React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
function App() { | |
return ( | |
<main style={{padding:"5px"}}> | |
<p style={{ fontWeight: "bold",fontFamily:"sans-serif" }}> | |
Elon Musk </p> | |
<p>18.6k Tweets</p> | |
<img alt="" | |
style={{ width: "100%" }} | |
src='https://pbs.twimg.com/profile_banners/44196397/1576183471/600x200' | |
/> | |
<img alt="" | |
style={{ | |
width: "150px", | |
borderRadius: "50%", | |
border: "4px solid white", | |
marginTop: "-45px", | |
}} | |
src='https://pbs.twimg.com/profile_images/1529956155937759233/Nyn1HZWF_400x400.jpg' | |
/> | |
<p style={{ fontWeight: "bold" }}>Elon Musk</p> | |
<p style={{ marginTop: "-15px" }}>@elonmusk</p> | |
<div style={{ display: "flex" }}> | |
<p style={{ margin: "5px",fontWeight: "bold" }}> | |
114 <span style={{ fontWeight: "normal" }}>Following</span> | |
</p> | |
<p style={{ margin: "5px",fontWeight: "bold" }}> | |
100.6 M <span style={{ fontWeight: "normal" }}>Followers</span> | |
</p> | |
</div> | |
</main> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment