• 模仿微信右上角菜单栏


    页面的大致布局结构

    <div class="other">
        <span>+</span>
        <ul class="tips-menu tips-open">
            <li>
                <span class="icon">图标</span>
                <div>发起群聊</div>
            </li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
        <div class="tips-masker"></div>
    </div>

     相对应的样式

    <style>
    .other .tips-menu {
        position: absolute;
        z-index: 2;
         133px;
        font-size: 16px;
        right: -10px;
        top: 54px;
        text-align: left;
        border-radius: 2px;
        background-color: #49484b;
        padding: 0 15px;
        -webkit-transform-origin: 90% 0;
        transform-origin: 90% 0;
    }
    .tips-open{
        transition: initial;
        opacity: 1;
    }
    .tips-close{
        opacity: 0;
        transition: opacity .2s ease,transform .6s ease;
        -webkit-transform: scale(0);
        transform: scale(0);
    }
    .other .tips-menu{ 
         0;
        height: 0; 
        position: absolute; 
        top: -8px; 
        right: 15px;
        content: ""; 
        border- 0 6px 8px; 
        border-color: transparent transparent #49484b; 
        border-style: solid; 
    } 
    .other .tips-menu li {
        position: relative; 
        height: 40px; 
        line-height: 40px;
    } 
    .other .tips-menu .icon{ 
        float: left;
        margin-right: 15px; 
    }
    .other .tips-masker {
        position: fixed;
        left: 0;
        top: 0;
         100%;
        z-index: 1;
        top: 45px;
        bottom: 50px;
    }
    </style>
    

      

      具体根据实际情况作出相对应的改变

  • 相关阅读:
    Activity-fragment-ListView展示
    Android-fragment简介-fragment的简单使用
    Android-LoaderManager异步加载数据库数据
    Android-上下文菜单Menu
    Android-普通菜单Menu
    Android-Git命令行操作
    zabbix安装步骤
    redis安装及简单使用
    ansible安装
    ansible-palybook
  • 原文地址:https://www.cnblogs.com/yuanyanbk/p/8192873.html
Copyright © 2020-2023  润新知