我正在尝试修复我网站上的错误。它关于顶部左侧3个图标左上角的方框。当页面加载时我希望它在屏幕外,直到用户将鼠标悬停在其中一个图标上,然后我才想要显示文本。我尝试将起始位置移出屏幕,但是当我滚动一个图标时,该框不会与图标对齐,因为距离已被推过。
easeInOutCubic: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
easeOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
easeInOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d) {
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
},
easeInOutBounce: function (x, t, b, c, d) {
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}
})
的style.css
* {
margin: 0;
padding: 0;
}
body {
background: url(images/backgroundimg2.jpg) repeat;
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 20px;
color: #222;
}
a {
text-decoration: none;
color: #99AECD;
}
a:hover {
text-decoration: underline;
color: #4F5D7F;
}
#menu {
height: 40px;
width:auto;
background: url(images/topbar.jpg) repeat-x;
text-align:center;
position:relative
padding-top: 7px;
}
#menu ul {
/* remove the list style and spaces*/
margin:0;
padding:0;
list-style:none;
display:inline;
/* position absolute so that z-index can be defined */
position:absolute;
/* center the menu, depend on the width of you menu*/
left:110px;
top:0;
}
#menu ul li {
/* give some spaces between the list items */
margin:0 5px;
/* display the list item in single row */
float:left;
}
#menu #box {
/* position absolute so that z-index can be defined and able to move this item using javascript */
position:absolute;
left:95px;
top:43px;
z-index:200;
/* image of the right rounded corner */
background:url(tail.gif) no-repeat right center;
height:35px;
/* add padding 8px so that the tail would appear */
padding-right:8px;
/* set the box position manually */
margin-left:5px;
width: 110px;
}
#menu #box .head {
/* image of the left rounded corner */
background:url(head.gif) no-repeat 0 0;
height:35px;
color:#eee;
/* force text display in one line */
white-space:nowrap;
/* set the text position manually */
padding-left:8px;
padding-top:12px;
}
.topiconhome {
padding-right: 20px;
}
.topiconcon {
padding-right: 20px;
}
.topiconfa {
padding-right: 165px;
}
#wrap {
margin: 10px auto 10px auto;
width: 1024px;
background: #fff;
border: 1px solid #213965;
}
#wrap2 {
margin: 10px auto 10px auto;
width: 1024px;
background: #fff;
border: 1px solid #213965;
}
#header {
height: 90px;
width: 1024px;
margin: 0 auto;
background: url(images/headerfinal.png) no-repeat;
}
#header h1 {
font-size: 50px;
letter-spacing: -7px;
padding: 17px 0 0 10px;
color: #FF5500;
}
#header h1 a {
color: #D1DDEF;
text-decoration: none;
font-weight: 600;
letter-spacing: -7px;
}
#header h1 a:hover {
color: #fff;
}
#menu2 {
height: 30px;
width: 1024px;
line-height: 30px;
background: #213965;
}
#menu2 ul {
list-style-type: none;
padding-left: 25px;
float: absolute;
}
#menu2 ul li {
display: block;
float: left;
margin: 0 30px 0 19px;
}
#menu2 ul li a {
padding: 0 30px 0 0;
text-decoration: none;
font-weight: 600;
font-size: 12px;
color: #fff;
}
#menu2 ul li a:hover {
color: #aaa;
text-decoration: none;
}
#content {
padding: 0 20px 20px 0;
}
.right {
width: 1024px;
text-align: justify;
padding-top: 5px;
}
.right p {
padding: 0px 10px;
}
.right h2 {
font-size: 18px;
font-weight: 100;
padding: 15px 10px 7px 10px;
}
.right h2 a {
text-decoration: none;
}
.right h2 a:hover {
}
#middlebox {
width: 950px;
border: 0px blue dashed;
padding-top: 5px;
}
.fahomeicon {
padding-top: top;
padding-right: 100px;
}
.left {
float: left;
width: 230px;
padding-top: 190px
padding-bottom; 700px
;
}
.left h2 {
padding-left: 10px;
height: 24px;
line-height: 24px;
color: #7988AF;
font-size: 15px;
}
.left ul {
padding: 10px 27px 15px 25px;
list-style-type: disc;
color: #99AECD;
}
.left ul li a {
text-decoration: none;
font-weight: 600;
}
.left ul li a:hover {
}
.sidelinks{
margin:20px 0
padding-bottom:bottom
;
}
#footer {
text-align: center;
font-size: 11px;
color: #aaa;
}
#footer a { color: #aaa; }
#footer a:hover { color: #111; }