文字遮挡和二级菜单

2019-01-08  本文已影响0人  心i_af0a
.box{
    width:200px;
    height:300px;
    margin:50px auto 0;
    position:relative;
    overflow:hidden;
}
.box .info{
          width:200px;
          height:300px;
          background-color:rgba(0,0,0,0.5);
          color:white;
          position:absolute;
          left:0;
          top:300px;
          transition:all 500ms ease;
  }
.box:hover .info{
        top:150px;
  }

二级菜单

 .box{
    width:200px;
    height:300px;
    margin:50px auto 0;
    border:1px solid #000;
    position:relattive;
  }
.box .info{
      width:200px;
      height:300px;
      background-color:rgba(0,0,0,0.5);
      color:white;
      position:absolute;
      left:200px;
      top:0px;
      display:none;
  }
上一篇下一篇

猜你喜欢

热点阅读