Skip to content

Instantly share code, notes, and snippets.

@PKTseng

PKTseng/css.css

Last active Apr 7, 2020
Embed
What would you like to do?
index
.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