Created
February 12, 2019 13:23
-
-
Save hata6502/3888386d7cb04aff850a02a161d880d1 to your computer and use it in GitHub Desktop.
Flexbox と SCSS のテスト
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
<html> | |
<head> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<h1>Flex Test</h1> | |
<div class="flex-container"> | |
<div class="flex-item"> | |
<h2>Item A</h2> | |
<p>ghttedscvbgfhyt4rewdscvbnytredscvbghtyrewdscxvbghtyrewdsdvbgfhtrewdscvbgjytrewdscxvbght</p> | |
</div> | |
<div class="flex-item"> | |
<h2>Item B</h2> | |
<p>ddvfbghgredsfghtrewdvgnhedsafbgjgefdsvbmhtrdsvbnhjytewscnhjytrewdscvbnhjyutewsaddfghjkuytrewqertyuiluytrewqertyukiluytrew</p> | |
</div> | |
<div class="flex-item"> | |
<h2>Item C</h2> | |
<p>flkuytresdghjkiu654ewsdghjkiu6543wsdhjuy</p> | |
</div> | |
<div class="flex-item"> | |
<h2>Item D</h2> | |
<p>keokofkeopfkeokfopekfopefkopek</p> | |
</div> | |
<div class="flex-item"> | |
<h2>Item E</h2> | |
<p>sdfghjklii7543eqwdscbnjh,iul8u56e3rwdghyjtefbyhjitjvirjoi4tjiojoierjoirejiejoptoertriutiutioerutioutiueutoiwuituioetuioerutioewutopuip</p> | |
</div> | |
</div> | |
</body> | |
</html> |
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-container { | |
display: flex; | |
flex-wrap: wrap; | |
justify-content: center; | |
border: 1px solid black; | |
} | |
.flex-item { | |
width: 25%; // flex-basis は変化する | |
margin: 1em; | |
padding: 0.5em; | |
border: 1px solid black; | |
word-wrap: break-word; | |
h2 { | |
margin: 0.5ex; | |
text-align: center; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment