-
-
Save xiaody/29bb04a8b549a758c451779220ae6353 to your computer and use it in GitHub Desktop.
flex absolute
This file contains 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
/* flex absolute */ | |
* {box-sizing: border-box;} | |
#root { | |
border: 1px solid black; | |
} | |
#parent { | |
display: flex; | |
height: 200px; | |
padding: 30px; | |
margin: 30px; | |
border: 10px solid red; | |
align-items: center; | |
justify-content: space-around; | |
} | |
#c1 { | |
position: absolute; | |
height: 50px; | |
width: 50px; | |
border: 1px solid green; | |
} | |
#c2 { height: 50px; width: 50px; border: 1px solid blue;} | |
#c3 { height: 50px; width: 50px; border: 1px solid yellow;} |
This file contains 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
<div id=root> | |
<div id=parent> | |
<div id=c1></div> | |
<div id=c2></div> | |
<div id=c3></div> | |
</div> | |
</div> |
This file contains 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
// alert('Hello world!'); |
This file contains 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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment