css模仿手机端微信首页及菜单弹出效果代码

代码语言:html

所属分类:布局界面

代码描述:css模仿手机端微信首页及菜单弹出效果代码

代码标签: 端微 首页 菜单 弹出 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
   
<head>
       
<meta charset="UTF-8">
       
<title>会话列表</title>
       
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
       
<meta content="yes" name="apple-mobile-web-app-capable"/>
       
<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
       
<meta content="telephone=no" name="format-detection"/>
   
<style>
        /* 公共样式表css */
html,body {
    color: #333;
    margin: 0;
    height: 100%;
    font-family: "Myriad Set Pro","Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: normal;
}

a, label, button, input, select {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: #000;
}

img {
    border: 0;
}

body {
    background: #fff;
    color: #666;
}

html, body, div, dl, dt, dd, ol, ul, li, h1, h2, h3, h4, h5, h6, p, blockquote, pre, button, fieldset, form, input, legend, textarea, th, td {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: #08acee;
}

button {
    outline: 0;
}

img {
    border: 0;
}

button,input,optgroup,select,textarea {
    margin: 0;
    font: inherit;
    color: inherit;
    outline: none;
}

li {
    list-style: none;
}

a {
    color: #666;
}

.clearfix::after {
    clear: both;
    content: ".";
    display: block;
    height: 0;
    visibility: hidden;
}

.clearfix {
}

/* 必要布局样式css */
.aui-flexView {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}

.aui-navBar {
    height: 44px;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    background-color: #36353b;
}

.aui-center {
    -webkit-box-ordinal-group: 3;
    -webkit-order: 2;
    -ms-flex-order: 2;
    order: 2;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    height: 44px;
    width: 50%;
    margin-left: 24%;
}

.aui-center-title {
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    color: #fff;
}

.aui-navBar-item {
    height: 44px;
    min-width: 25%;
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 25%;
    -ms-flex: 0 0 25%;
    flex: 0 0 25%;
    padding: 0 20px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    font-size: 0.3rem;
    white-space: nowrap;
    position: relative;
    color: #5C5C5C;
}

.aui-navBar-item:last-child {
    -webkit-box-ordinal-group: 4;
    -webkit-order: 3;
    -ms-flex-order: 3;
    order: 3;
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    min-width: 19%;
}

.icon {
    width: 23px;
    height: 23px;
    background-size: 23px;
    display: block;
    background-repeat: no-repeat;
}

.icon-add {
    width: 15px;
    height: 15px;
    background-size: 15px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAYAAACMRWrdAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHB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BVHja7NkxDoAgEARA8P//UNA/ntIaLc9EnUug3UwCFEuJiJK5lqXHeea5RXZuHVvy3AXUzNCpfHTAwMDAwMDAwMDAwMDAwMDAwN4Ea20d9Vjmupu0zGGq8UCx6CiC/RnW+/Y51PF4+JRwx8DAwMDAwMDAwMDAwMDAwMDAXgy76i2f6DJ3AQYAESPtdPYmUtoAAAAASUVORK5CYII=');
}

.aui-scrollView {
    width: 100%;
    height: 100%;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
    margin-bottom: -1px;
}

.aui-search {
    background: #efeff4;
    padding: 10px;
    position: relative;
    z-index: 100;
}

.aui-search:after {
    content: " ";
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    height: 1px;
    border-bottom: 1px solid #e5e5e5;
    color: #e5e5e5;
    -webkit-transform-origin: 0 100%;
    transform-origin: 0 100%;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
}

.aui-search-box {
    background: #fff;
    width: 100%;
    height: 32px;
    line-height: 30px;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    position: relative;
}

.aui-search-box input {
    color: #000000;
    font-size: 13px;
    width: 100%;
    height: 23px;
    line-height: 23px;
    text-align: center;
    background: none;
    border: none;
}

.aui-flex-list {
    position: relative;
    margin-top: -1px;
}

.aui-flex-list-item {
    padding: 10px 14px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    color: #000000;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    position: relative;
}

.aui-flex-list-image {
    margin-right: 10px;
    width: 45px;
    height: 45px;
    line-height: 60px;
    text-align: center;
    position: relative;
}

.aui-flex-list-image img {
    width: 100%;
    max-height: 100%;
    vertical-align: top;
    display: block;
    border: none;
    border-radius: 4px;
}

.aui-flex-list-text {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
}

.aui-flex-list-text h4 {
    font-weight: 400;
    font-size: 15px;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: normal;
    word-wrap: break-word;
    word-break: break-all;
}

.aui-flex-list-text p {
    padding-top: 5px;
    color: #9b9b9b;
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    padding-right: 40px;
}

.aui-flex-list-item:before {
    content: " ";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 1px;
    border-top: 1px solid #E5E5E5;
    color: #E5E5E5;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: scaleY(0.5);
    transfo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0