刚开始还不懂nth-of-type和nth-child的区别,研究了一下才明白,nth-of-type是父元素下第n个element的元素(首先那个元素必须是符合element的),而nth-child是父元素下第几个元素,若不符合element,则选择失败
2015-06-18
一开始也看不懂,简化些
background-image:linear-gradient(to right,#dd2222,#dd2926);
background-repeat: no-repeat;
background-position: right;
background-size: 1px 15px;
原来是这样嘛
background-image:linear-gradient(to right,#dd2222,#dd2926);
background-repeat: no-repeat;
background-position: right;
background-size: 1px 15px;
原来是这样嘛
2015-06-17
div{display:flex; float:left;
width:50px;
height:50px;
background-color:#eee;
flex-direction:row;
align-items: center;
justify-content:center;
}
div:hover{
color:white;
background-color:#ccc;
cursor:pointer;
}
width:50px;
height:50px;
background-color:#eee;
flex-direction:row;
align-items: center;
justify-content:center;
}
div:hover{
color:white;
background-color:#ccc;
cursor:pointer;
}
2015-06-17
body {
display:flex;
align-items: center;
justify-content:center;
}
display:flex;
align-items: center;
justify-content:center;
}
2015-06-17
<style>
div{
display:flex;
width:50px;
height:50px;
background-color:#eee;
text-align:center;
vertical-align:middle;
}
</style>
<body>
<div> 1 </div>
<div> 2 </div>
<div> 3 </div>
</body>
div{
display:flex;
width:50px;
height:50px;
background-color:#eee;
text-align:center;
vertical-align:middle;
}
</style>
<body>
<div> 1 </div>
<div> 2 </div>
<div> 3 </div>
</body>
2015-06-17