具有投票和用户名的图像翻转

时间:2013-06-25 16:56:04

标签: css

我一直在研究一款使用API​​提取Instagram图片的应用。我需要在悬停时显示心脏翻转时“喜欢”的数量和用户名。我怎么做到这一点?我已经附上了我当前的应用程序前端(这里没有显示用户名和投票)。非常感谢你!app front end view

<ul>
    <li id= 'instagram'>
     <div class="roll">     
            <IMG class="on" img src='{{i[0]}}'/>
            <IMG class="off" img src="http://f.cl.ly/items/321322043C0Y2g0R2K0g/smallerheart.jpg"/>
            <div id="caption">{{i[1]}}</div>
            <div id="username">{{i[2]}}</div>   
            <div id="likes">{{i[3]}}</div>  
     </div>
   </li>
</ul>   
img {
    width: 300px;
    height: 300px;
    padding: 1px;
    background-color: white;} 

.roll 
    .width: 300px;}
    .height: 300px;}
    .opacity:0;}
    .roll {background: blue;}
    .roll .on {display: block;}
    .roll .off {display: none;}
    .roll:hover .off { z-index:0; position: relative; display: block;}
    .roll:hover .on {z-index:0; position: absolute; display: block;}    

li#instagram {
    float: left;
    display: ;
    margin-bottom: 20px;
    background-color: white;
    z-index:1;
    list-style-type: none;}     

#caption {
    font-family:'Linotype Univers W01 Cn';
    font-size: 14px;
    font-color:white;
    width: 300px;
    height: 35px;
    margin-left: auto;
    margin-right: auto;
    padding: 3px 0px 0px 0px;
    text-align: center;
    background-color: #FF6633;
    overflow: hidden;}      

0 个答案:

没有答案