1.用bootstrap做了个自适应官网,滚动监听渐变在安卓手机中失效
2.代码块如下:
.animat{
animation: myAnimation 3s 0s ease-in-out both;
-moz-animation: myAnimation 3s 0s ease-in-out both;
-webkit-animation: myAnimation 3s 0s ease-in-out both;
-o-animation: myAnimation 3s 0s ease-in-out both;
}
@keyframes myAnimation {
0% {
background-color: rgba(17,17,17,0.4);
}
25% {
background-color: rgba(17,17,17,0.6);
}
50% {
background-color: rgba(17,17,17,0.8);
}
100% {
background-color: rgb(32,32,32);
}
}
@-moz-keyframes myAnimation { / Firefox /
0% {
background-color: rgba(17,17,17,0.4);
}
25% {
background-color: rgba(17,17,17,0.6);
}
50% {
background-color: rgba(17,17,17,0.8);
}
100% {
background-color: rgb(32,32,32);
}
}
@-webkit-keyframes myAnimation { /Safari和Chrome/
0% {
background-color: rgba(17,17,17,0.4);
}
25% {
background-color: rgba(17,17,17,0.6);
}
50% {
background-color: rgba(17,17,17,0.8);
}
100% {
background-color: rgb(32,32,32);
}
}
@-o-keyframes myAnimation { /Safari和Chrome/
0% {
background-color: rgba(17,17,17,0.4);
}
25% {
background-color: rgba(17,17,17,0.6);
}
50% {
background-color: rgba(17,17,17,0.8);
}
100% {
background-color: rgb(32,32,32);
}
}
div#example-navbar-collapse{
border-color: transparent;
}
div#example-navbar-collapse>ul>li>a{
font-size: 16px;
color: white;
line-height:50px;
}
div.navLogo{
padding: 0px;
margin-top: 1.6em;
}
div.navLogo>span{
font-size:26px;
}
div#example-navbar-collapse>ul{
padding-right: 1.5%;
}
div#example-navbar-collapse>ul>li{
margin-right: 1em;
}
这是完整答案
10 回答11.2k 阅读
15 回答8.2k 阅读
5 回答4.9k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
8 回答6k 阅读
2 回答2.8k 阅读✓ 已解决
4 回答4.5k 阅读✓ 已解决
需要加个前缀来适配,比如:
安卓用了
webkit
内核,所以要加