create tooltips using CSS transitions and the pseudo-classes :before and :after

来源:互联网 发布:淘宝店铺手机端 编辑:程序博客网 时间:2024/06/06 00:53


The orignal artical is in : http://tympanus.net/codrops/2012/02/01/how-to-create-animated-tooltips-with-css3/



  • text-shadow:5px 5px 5px red;

The text-shadow Property



  • BACKGROUND:transparent none repeat scroll 0% 0% 

分别代表

背景属性:背景颜色 背景图片 背景是否重复 背景时候随浏览器滚动 背景平位置 背景垂直位置

background : background-color || background-image || background-repeat || background-attachment || background-position


transparent表示透明无颜色

none 表示没有设置背景图片

repeat 表示图片重复

scroll 表示背景图片随浏览器下拉而滚动

0%水平位置在x0

0%垂直位置在y0 


  • Insert content before every <p> element's content:

    p:before

    content:"Read this: ";
    }


  • merge imgs in a img, and show different part as needed
    • .tt-wrapper li a{
    • display: block;
    • width: 68px;
    • height: 70px;
    • margin: 0 2px;
    • outline: none;
    • background: transparent url(../images/growcase_the_social_gunman_icons.png) no-repeat top left;
    • text-indent: -9000px;
    • position: relative;
    • }
    • .tt-wrapper li .tt-gplus{
    •     background-position: 0px 0px;
    • }
    • .tt-wrapper li .tt-twitter{
    •     background-position: -68px 0px;
    • }
    • .tt-wrapper li .tt-dribbble{
    •     background-position: -136px 0px;
    • }
    • .tt-wrapper li .tt-facebook{
    •     background-position: -204px 0px;
    • }
    • .tt-wrapper li .tt-linkedin{
    •     background-position: -272px 0px;
    • }
    • .tt-wrapper li .tt-forrst{
    •     background-position: -340px 0px;
    • }


原创粉丝点击