Shu*_*dra 4 html css jquery html-lists css-float
这是一个jsfiddle链接:http://jsfiddle.net/qrzwD/
我只是不喜欢我的第二个li在动画完成后向上移动.
有人可以帮我阻止这个.
这是我的HTML:
<nav>
<ul>
<li> <a class="content-box-blue" href="#"> </a> </li>
<li> <a class="content-box-gray" href="#"> </a> </li>
</ul>
</nav>
Run Code Online (Sandbox Code Playgroud)
这是我的css:
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
a {
text-decoration: none;
margin: 0;
padding: 0;
}
ul, li, nav {
margin: 0;
padding: 0;
}
nav {
float: right;
width: 400px;
margin-top: 35px;
margin-right: 10px;
}
nav ul {
list-style-type: none;
float: right;
}
nav li {
float: right;
clear: right;
margin-bottom: 20px;
}
.content-box-blue {
background-color: #00bfff;
border: 1px solid #afcde3;
height: 50px;
width: 0px;
border-top-left-radius: 8% 50%;
border-bottom-left-radius: 8% 50%;
text-align:center;
line-height:50px;
}
.content-box-gray {
background-color: #FF69B4;
border: 1px solid #bdbdbd;
height: 50px;
width: 0px;
border-top-left-radius: 12% 50%;
border-bottom-left-radius: 12% 50%;
text-align:center;
line-height:50px;
}
Run Code Online (Sandbox Code Playgroud)
这是我的jquery代码:
$(function(){
$(".content-box-blue").animate({width:'350px'},1200,function(){$('<span>Charcoal Paintings</span>').fadeIn(1000).appendTo($(this));});
$(".content-box-gray").animate({width:'250px'},1200,function(){$('<span>Sketches</span>').fadeIn(2000).appendTo($(this));});
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
185 次 |
| 最近记录: |