css悬浮展示隐藏内容,从下向上展示

css悬浮展示隐藏内容,从下向上展示_第1张图片

css悬浮展示隐藏内容,从下向上展示_第2张图片 标题
    

无锡2日1晚自由行(5钻)·【5.23-5.25抢购】

席位充足

350

特卖
只卖3天,套餐卖价格等于外网一间房间的价格
标题:动态效果
内容:悬浮时底部向上动态展示内容

 

*{
    margin: 0px;
    padding: 0px;
}

.cont{
    width: 917px;
    height: 343px;
}
.box{
    width: 220px;
    height: 158px;
    color: #666666;
    float: left;
    margin: 5px 5px 12px 2px;
    position: relative;
}
img{
    width: 220px;
    height: 110px;
}
.title{
    font-size: 11px;
    height: 27px;
    line-height: 27px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.txt_a{
    float: left;
    font-size: 11px;
    color: #c2a5b2;
}
.price{
    float:right;
    font-size: 9px;
    vertical-align: super;
}
.price_num{
    font-size: 16px;
    color: red;
    font-weight: bold;
}
.label_img{
    width: 39px;
    height: 25px;
    font-size: 11px;
    background-image: url(../images/un_sprite_tag.png);
    background-repeat: no-repeat;
    position: absolute;
    top: 0px;
    left: 12px;
    text-align: center;
    color: white;
    line-height: 25px;
}
//悬浮展示样式
.img_txt{
    width: 216px;
    height: 25px;
    font-size: 11px;
    line-height: 25px;
    background-color: rgba(0, 0, 0, 0.308);
    position: absolute;
    top: 85px;
    color: white;
    overflow: hidden;
    padding-left: 4px;
    transition: 1s;
}
.box:hover .img_txt{
    height: 110px;
    top: 0px;
}

你可能感兴趣的:(css,前端,javascript)