如果黄色div的垂直居中位置有有一行字,div样式如height:200px;line-height:200px;text-align:center.怎么让这行字随着div高度的减小而一直处于垂直居中的位置????
2015-01-16
ol > li:nth-last-child(5){
background: orange;
}
n可有可无的因为代表倍数关系
background: orange;
}
n可有可无的因为代表倍数关系
2015-01-16
我觉得这样解释好理解一些:target选中的元素的id被当做文档中的超链接的目标来使用.
如 <a href="#myDiv"></a> <div id="myDiv"></div>
如 <a href="#myDiv"></a> <div id="myDiv"></div>
2015-01-15
@-webkit-keyframes changecolor{
0%{
background: red;
}
20%{
background:blue;
}
40%{
background:orange;
}
60%{
background:green;
}
80%{
background:yellow;
}
100%{
background: red;
}
}
div:hover {
-webkit-animation: changecolor 5s ease-out .2s;
}
0%{
background: red;
}
20%{
background:blue;
}
40%{
background:orange;
}
60%{
background:green;
}
80%{
background:yellow;
}
100%{
background: red;
}
}
div:hover {
-webkit-animation: changecolor 5s ease-out .2s;
}
2015-01-15