Skip to content

Instantly share code, notes, and snippets.

@libo1106
Created December 4, 2012 09:08
Show Gist options
  • Save libo1106/4202061 to your computer and use it in GitHub Desktop.
Save libo1106/4202061 to your computer and use it in GitHub Desktop.
tips存CSS实现,支持IE7+、Chrome、Firefox、Opera
a .tips_hover {
color:#333;
line-height:18px;
vertical-align:middle;
text-shadow:#ffffff 0 1px 0;
text-align: left;
padding:7px 14px;
width: 300px;
position: relative;
top: -999px;
right: 340px;
border:1px solid #919191;
background:#fff;
background:-webkit-gradient(linear,left top,left bottom,from(#ffffff),to(#e4e5f0));
background:-webkit-linear-gradient(top,#ffffff,#e4e5f0);
background:-moz-linear-gradient(top,#ffffff,#e4e5f0);
background:-ms-linear-gradient(top,#ffffff,#e4e5f0);
background:-o-linear-gradient(top,#ffffff,#e4e5f0);
background-image:-ms-linear-gradient(top,#ffffff 0%,#e4e5f0 100%);
border-radius:4px;
box-shadow:rgba(0,0,0,0.3) 0 1px 3px,inset rgba(255,255,255,0.4) 0 1px 0;
opacity:0;
filter:alpha(opacity=0); /* for IE8 and earlier */
-webkit-transition:opacity .3s ease,top .3s ease;
-moz-transition:opacity .3s ease,top .3s ease;
-o-transition:opacity .3s ease,top .3s ease;
transition:opacity .3s ease,top .3s ease;
}
a:hover .tips_hover{
top: 10px;
opacity:1 ;
filter:alpha(opacity=100); /* for IE8 and earlier */
-webkit-transition:opacity .3s ease,top .3s ease;
-moz-transition:opacity .3s ease,top .3s ease;
-o-transition:opacity .3s ease,top .3s ease;
transition:opacity .3s ease,top .3s ease;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment