Last active
April 7, 2020 13:50
-
-
Save PKTseng/8c6e8d9ca83b0896224921b41e2668d1 to your computer and use it in GitHub Desktop.
index
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
.container { | |
width: 500px; | |
background: #0099ff; | |
margin: 0 auto; | |
} | |
.container .item { | |
background: #00ffa2; | |
color: #d32a2a; | |
text-align: center; | |
font-size: 36px; | |
margin-bottom: 10px; | |
} | |
.container .item1 { | |
height: 150px; | |
width: 150px; | |
} | |
.container .item2 { | |
height: 200px; | |
width: auto; | |
//因為沒設定寬度,所以會自適應延伸父元素, | |
//父元素寬多少ex:500px,子元素寬就會多少ex:500px | |
} | |
.container .item3 { | |
height: auto; | |
width: 400px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment