/* ColorUi for MP-weixin v2.1.4 | by 文晓港 2019年4月25日19:15:42 仅供学习交流,如作它用所承受的法律责任一概与作者无关 使用ColorUi开发扩展与插件时,请注明基于ColorUi开发 (QQ交流群:240787041) */ /* ================== 初始化 ==================== */ page { /* Color 可以自定义相关配色 *//* var属性兼容性 --> https://www.caniuse.com/#feat=css-variables *//* 标准色 */ --red: #e54d42; --orange: #f37b1d; --yellow: #fbbd08; --olive: #8dc63f; --green: #39b54a; --cyan: #1cbbb4; --blue: #008AFF; --purple: #6739b6; --mauve: #9c26b0; --pink: #e03997; --brown: #a5673f; --grey: #8799a3; --black: #333; --darkGray: #666; --gray: #aaa; --ghostWhite: #f1f1f1; --white: #fff; /* 浅色 */ --redLight: #fadbd9; --orangeLight: #fde6d2; --yellowLight: #fef2ce; --oliveLight: #e8f4d9; --greenLight: #d7f0db; --cyanLight: #d2f1f0; --blueLight: #cce6ff; --purpleLight: #e1d7f0; --mauveLight: #ebd4ef; --pinkLight: #f9d7ea; --brownLight: #ede1d9; --greyLight: #e7ebed; /* 渐变色 */ --gradualRed: linear-gradient(45deg, #f43f3b, #ec008c); --gradualOrange: linear-gradient(45deg, #ff9700, #ed1c24); --gradualGreen: linear-gradient(45deg, #39b54a, #8dc63f); --gradualPurple: linear-gradient(45deg, #9000ff, #5e00ff); --gradualPink: linear-gradient(45deg, #ec008c, #6739b6); --gradualBlue: linear-gradient(45deg, #009ee0, #009ee0); /* 阴影透明色 */ --ShadowSize: 6rpx 6rpx 8rpx; --redShadow: rgba(204, 69, 59, 0.2); --orangeShadow: rgba(217, 109, 26, 0.2); --yellowShadow: rgba(224, 170, 7, 0.2); --oliveShadow: rgba(124, 173, 55, 0.2); --greenShadow: rgba(48, 156, 63, 0.2); --cyanShadow: rgba(28, 187, 180, 0.2); --blueShadow: rgba(0, 102, 204, 0.2); --purpleShadow: rgba(88, 48, 156, 0.2); --mauveShadow: rgba(133, 33, 150, 0.2); --pinkShadow: rgba(199, 50, 134, 0.2); --brownShadow: rgba(140, 88, 53, 0.2); --greyShadow: rgba(114, 130, 138, 0.2); --grayShadow: rgba(114, 130, 138, 0.2); --blackShadow: rgba(26, 26, 26, 0.2); background-color: var(--ghostWhite); font-size: 28rpx; color: var(--black); font-family: Helvetica Neue, Helvetica, sans-serif; } view, scroll-view, swiper, button, input, textarea, label, navigator, image { box-sizing: border-box; } .round { border-radius: 5000rpx; } .radius { border-radius: 6rpx; } .bg-white{ background-color: white; } .bg-blue{ background: linear-gradient(127deg, rgba(0,122,255) 0%, rgba(13,100,227) 100%); } /* ================== 头像 ==================== */ .cu-avatar { font-variant: small-caps; margin: 0; padding: 0; display: inline-flex; text-align: center; justify-content: center; align-items: center; background-color: #ccc; color: var(--white); white-space: nowrap; position: relative; width: 64rpx; height: 64rpx; background-size: cover; background-position: center; vertical-align: middle; font-size: 1.5em; } .cu-avatar.sm { width: 48rpx; height: 48rpx; font-size: 1em; } .cu-avatar.lg { width: 96rpx; height: 96rpx; font-size: 2em; } .cu-avatar.slg { width: 60rpx; height: 60rpx; font-size: 2em; } .cu-avatar.xl { width: 128rpx; height: 128rpx; font-size: 2.5em; } .cu-avatar .avatar-text { font-size: 0.4em; } .cu-avatar-group { direction: rtl; unicode-bidi: bidi-override; padding: 0 10rpx 0 40rpx; display: inline-block; } .cu-avatar-group .cu-avatar { margin-left: -30rpx; border: 4rpx solid var(--ghostWhite); vertical-align: middle; } .cu-avatar-group .cu-avatar.sm { margin-left: -20rpx; border: 1rpx solid var(--ghostWhite); } /* ================== 操作条 ==================== */ .cu-bar { display: flex; position: relative; align-items: center; min-height: 100rpx; justify-content: space-between; } .cu-bar .action { display: flex; align-items: center; height: 100%; justify-content: center; max-width: 100%; } .cu-bar .action.border-title { position: relative; top: -10rpx; } .cu-bar .action.border-title text[class*="bg-"]:last-child { position: absolute; bottom: -0.5rem; min-width: 2rem; height: 6rpx; left: 0; } .cu-bar .action.sub-title { position: relative; top: -0.2rem; } .cu-bar .action.sub-title text { position: relative; z-index: 1; } .cu-bar .action.sub-title text[class*="bg-"]:last-child { position: absolute; display: inline-block; bottom: -0.2rem; border-radius: 6rpx; width: 100%; height: 0.6rem; left: 0.6rem; opacity: 0.3; z-index: 0; } .cu-bar .action.sub-title text[class*="text-"]:last-child { position: absolute; display: inline-block; bottom: -0.7rem; left: 0.5rem; opacity: 0.2; z-index: 0; text-align: right; font-weight: 900; font-size: 36rpx; } .cu-bar.justify-center .action.border-title text:last-child, .cu-bar.justify-center .action.sub-title text:last-child { left: 0; right: 0; margin: auto; text-align: center; } .cu-bar .action:first-child { margin-left: 30rpx; font-size: 30rpx; } .cu-bar .action text.text-cut { text-align: left; width: 100%; } .cu-bar .cu-avatar:first-child { margin-left: 20rpx; } .cu-bar .action:first-child>text[class*="cuIcon-"] { margin-left: -0.3em; /* margin-right: 0.3em; */ } .cu-bar .action:last-child { margin-right: 30rpx; } .cu-bar .action>text[class*="cuIcon-"], .cu-bar .action>view[class*="cuIcon-"] { font-size: 36rpx; } .cu-bar .action>text[class*="cuIcon-"]+text[class*="cuIcon-"] { margin-left: 0.5em; } .cu-bar .content { position: absolute; text-align: center; width: calc(100% - 340rpx); left: 0; right: 0; bottom: 0; top: 0; margin: auto; height: 60rpx; font-size: 32rpx; line-height: 60rpx; cursor: none; pointer-events: none; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } .cu-bar.ios .content { bottom: 7px; height: 30px; font-size: 32rpx; line-height: 30px; } .cu-bar.btn-group { justify-content: space-around; } .cu-bar.btn-group button { padding: 20rpx 32rpx; } .cu-bar.btn-group button { flex: 1; margin: 0 20rpx; max-width: 50%; } .cu-bar .search-form { background-color: #f5f5f5; line-height: 64rpx; height: 64rpx; font-size: 24rpx; color: var(--black); flex: 1; display: flex; align-items: center; margin: 0 24rpx; } .cu-bar .search-form+.action { margin-right: 20rpx; } .cu-bar .search-form input { flex: 1; padding-right: 30rpx; height: 72rpx; line-height: 72rpx; font-size: 30rpx; background-color: transparent; } .cu-bar .search-form [class*="cuIcon-"] { margin: 0 0.5em 0 0.8em; } .cu-bar .search-form [class*="cuIcon-"]::before { top: 0rpx; } .cu-bar.fixed, .nav.fixed { position: fixed; width: 100%; top: 0; z-index: 19; box-shadow: 0 0rpx 2rpx rgba(0, 0, 0, 0.1); } .cu-bar.foot { position: fixed; width: 100%; bottom: 0; z-index: 9; /* box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, 0.1); */ } .cu-custom { display: block; position: relative; } .cu-custom .cu-bar .content { width: calc(100% - 440rpx); } .cu-custom .cu-bar .content image { height: 60rpx; width: 240rpx; } .cu-custom .cu-bar { padding-right: 190rpx; z-index: 99; /* box-shadow: 0rpx 0rpx 0rpx; */ } .cu-custom .cu-bar .border-custom { position: relative; background: rgba(0, 0, 0, 0.15); border-radius: 1000rpx; height: 30px; } .cu-custom .cu-bar .border-custom::after { content: " "; width: 200%; height: 200%; position: absolute; top: 0; left: 0; border-radius: inherit; transform: scale(0.5); transform-origin: 0 0; pointer-events: none; box-sizing: border-box; border: 1rpx solid var(--white); opacity: 0.5; } .cu-custom .cu-bar .border-custom::before { content: " "; width: 1rpx; height: 110%; position: absolute; top: 22.5%; left: 0; right: 0; margin: auto; transform: scale(0.5); transform-origin: 0 0; pointer-events: none; box-sizing: border-box; opacity: 0.6; background-color: var(--white); } .cu-custom .cu-bar .border-custom text { display: block; flex: 1; margin: auto !important; text-align: center; font-size: 34rpx; } /* ================== 导航栏 ==================== */ .nav { white-space: nowrap; } ::-webkit-scrollbar { display: none; } .nav .cu-item { height: 90rpx; display: inline-block; line-height: 90rpx; margin: 0 10rpx; padding: 0 20rpx; } .nav .cu-item.cur { border-bottom: 4rpx solid; } /* ================== 表单 ==================== */ .cu-form-group { background-color: var(--white); padding: 1rpx 30rpx; display: flex; align-items: center; min-height: 100rpx; justify-content: space-between; } .cu-form-group+.cu-form-group { border-top: 1rpx solid #eee; } .cu-form-group .title { text-align: justify; /* padding-right: 30rpx; */ font-size: 30rpx; position: relative; height: 60rpx; line-height: 60rpx; } .cu-form-group input { flex: 1; font-size: 30rpx; color: #555; padding-right: 20rpx; } .cu-form-group>text[class*="cuIcon-"] { font-size: 36rpx; padding: 0; box-sizing: border-box; } .cu-form-group textarea { margin: 32rpx 0 30rpx; height: 4.6em; width: 100%; line-height: 1.2em; flex: 1; font-size: 28rpx; padding: 0; } .cu-form-group.align-start .title { height: 1em; margin-top: 32rpx; line-height: 1em; } .cu-form-group picker { flex: 1; padding-right: 40rpx; overflow: hidden; position: relative; } .cu-form-group picker .picker { line-height: 100rpx; font-size: 28rpx; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; width: 100%; text-align: right; } .cu-form-group picker::after { font-family: "cuIcon"; display: block; content: "\e6a3"; position: absolute; font-size: 34rpx; color: var(--grey); line-height: 100rpx; width: 60rpx; text-align: center; top: 0; bottom: 0; right: -20rpx; margin: auto; } .cu-form-group textarea[disabled], .cu-form-group textarea[disabled] .placeholder { color: transparent; } /* -- flex弹性布局 -- */ .flex { display: flex; } .flex-direction { flex-direction: column; } .flex-wrap { flex-wrap: wrap; } .align-start { align-items: flex-start; } .align-end { align-items: flex-end; } .align-center { align-items: center; } .align-stretch { align-items: stretch; } .self-start { align-self: flex-start; } .self-center { align-self: flex-center; } .self-end { align-self: flex-end; } .self-stretch { align-self: stretch; } .align-stretch { align-items: stretch; } .justify-start { justify-content: flex-start; } .justify-end { justify-content: flex-end; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .justify-around { justify-content: space-around; } /* -- 内外边距 -- */ .margin-top { margin-top: 20rpx; } /* ================== 文本 ==================== */ .text-xs { font-size: 22rpx; } .text-sm { font-size: 24rpx; } .text-df { font-size: 28rpx; } .text-sg { font-size: 30rpx; } .text-lg { font-size: 32rpx; } .text-xl { font-size: 36rpx; } .text-xxl { font-size: 44rpx; } .text-xxxl { font-size: 56rpx; } .text-sl { font-size: 80rpx; } .text-xsl { font-size: 100rpx; } .text-Abc { text-transform: Capitalize; } .text-ABC { text-transform: Uppercase; } .text-abc { text-transform: Lowercase; } .text-price::before { content: "¥"; font-size: 80%; margin-right: 4rpx; } .text-cut { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } .text-bold { font-weight: bold; } .text-center { text-align: center; } .text-content { line-height: 1.6; } .text-left { text-align: left; } .text-right { text-align: right; } .text-red, .line-red, .lines-red { color: var(--red); } .text-orange, .line-orange, .lines-orange { color: var(--orange); } .text-yellow, .line-yellow, .lines-yellow { color: var(--yellow); } .text-olive, .line-olive, .lines-olive { color: var(--olive); } .text-green, .line-green, .lines-green { color: var(--green); } .text-cyan, .line-cyan, .lines-cyan { color: var(--cyan); } .text-blue, .line-blue, .lines-blue { color: var(--blue); } .text-purple, .line-purple, .lines-purple { color: var(--purple); } .text-mauve, .line-mauve, .lines-mauve { color: var(--mauve); } .text-pink, .line-pink, .lines-pink { color: var(--pink); } .text-brown, .line-brown, .lines-brown { color: var(--brown); } .text-grey, .line-grey, .lines-grey { color: var(--grey); } .text-gray, .line-gray, .lines-gray { color: var(--gray); } .text-black, .line-black, .lines-black { color: var(--black); } .text-white, .line-white, .lines-white { color: var(--white); } .list-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; } .img-empty { width: 310rpx; height: 220rpx; } .text-empty { margin-top: 48rpx; font-size: 30rpx; color: #666; text-align: center; } .input-grey { color: #AAA; } .font14 { font-size: 28rpx; } .cate_item { min-height: 80rpx; background-color: #eee; border-radius: 8rpx; margin: 0 24rpx; } .margin-b { margin-bottom: 16rpx; } .flex-sub { flex: 1; } /* ================== 列表 ==================== */ .grayscale { filter: grayscale(1); } .cu-list+.cu-list { margin-top: 30rpx } .cu-list>.cu-item { transition: all .6s ease-in-out 0s; transform: translateX(0rpx) } .cu-list>.cu-item.move-cur { transform: translateX(-260rpx) } .cu-list>.cu-item .move { position: absolute; right: 0; display: flex; width: 260rpx; height: 100%; transform: translateX(100%) } .cu-list>.cu-item .move view { display: flex; flex: 1; justify-content: center; align-items: center } .cu-list.menu-avatar { overflow: hidden; } .cu-list.menu-avatar>.cu-item { position: relative; display: flex; padding-right: 10rpx; height: 140rpx; background-color: var(--white); justify-content: flex-end; align-items: center } .cu-list.menu-avatar>.cu-item>.cu-avatar { position: absolute; left: 30rpx } .cu-list.menu-avatar>.cu-item .flex .text-cut { max-width: 510rpx } .cu-list.menu-avatar>.cu-item .content { position: absolute; left: 146rpx; width: calc(100% - 96rpx - 60rpx - 120rpx - 20rpx); line-height: 1.6em; } .cu-list.menu-avatar>.cu-item .content.flex-sub { width: calc(100% - 96rpx - 60rpx - 20rpx); } .cu-list.menu-avatar>.cu-item .content>view:first-child { font-size: 30rpx; display: flex; align-items: center } .cu-list.menu-avatar>.cu-item .content .cu-tag.sm { display: inline-block; margin-left: 10rpx; height: 28rpx; font-size: 16rpx; line-height: 32rpx } .cu-list.menu-avatar>.cu-item .action { width: 100rpx; text-align: center } .cu-list.menu-avatar>.cu-item .action view+view { margin-top: 10rpx } .cu-list.menu-avatar.comment>.cu-item .content { position: relative; left: 0; width: auto; flex: 1; } .cu-list.menu-avatar.comment>.cu-item { padding: 30rpx 30rpx 30rpx 120rpx; height: auto } .cu-list.menu-avatar.comment .cu-avatar { align-self: flex-start } .cu-list.menu>.cu-item { position: relative; display: flex; padding: 0 30rpx; min-height: 96rpx; background-color: var(--white); justify-content: space-between; align-items: center } .cu-list.menu>.cu-item:last-child:after { border: none } .cu-list.menu>.cu-item:after { position: absolute; top: 0; left: 0; box-sizing: border-box; width: 200%; height: 200%; border-bottom: 1rpx solid #ddd; border-radius: inherit; content: " "; transform: scale(.5); transform-origin: 0 0; pointer-events: none } .cu-list.menu>.cu-item.grayscale { background-color: #f5f5f5 } .cu-list.menu>.cu-item.cur { background-color: #fcf7e9 } .cu-list.menu>.cu-item.arrow { padding-right: 90rpx } .cu-list.menu>.cu-item.arrow:before { position: absolute; top: 0; right: 30rpx; bottom: 0; display: block; margin: auto; width: 30rpx; height: 30rpx; color: var(--grey); content: "\e6a3"; text-align: center; font-size: 34rpx; font-family: "cuIcon"; line-height: 30rpx } .cu-list.menu>.cu-item button.content { padding: 0; background-color: transparent; justify-content: flex-start } .cu-list.menu>.cu-item button.content:after { display: none } .cu-list.menu>.cu-item .cu-avatar-group .cu-avatar { border-color: var(--white) } .cu-list.menu>.cu-item .content>view:first-child { display: flex; align-items: center } .cu-list.menu>.cu-item .content>text[class*=cuIcon] { display: inline-block; margin-right: 10rpx; width: 1.6em; text-align: center } .cu-list.menu>.cu-item .content>image { display: inline-block; margin-right: 10rpx; width: 1.6em; height: 1.6em; vertical-align: middle } .cu-list.menu>.cu-item .content { font-size: 30rpx; line-height: 1.6em; flex: 1 } .cu-list.menu>.cu-item .content .cu-tag.sm { display: inline-block; margin-left: 10rpx; height: 28rpx; font-size: 16rpx; line-height: 32rpx } .cu-list.menu>.cu-item .action .cu-tag:empty { right: 10rpx } .cu-list.menu { display: block; overflow: hidden } .cu-list.menu.sm-border>.cu-item:after { left: 30rpx; width: calc(200% - 120rpx) } .cu-list.grid>.cu-item { position: relative; display: flex; padding: 20rpx 0 30rpx; transition-duration: 0s; flex-direction: column } .cu-list.grid>.cu-item:after { position: absolute; top: 0; left: 0; box-sizing: border-box; width: 200%; height: 200%; border-right: 1px solid rgba(0, 0, 0, .1); border-bottom: 1px solid rgba(0, 0, 0, .1); border-radius: inherit; content: " "; transform: scale(.5); transform-origin: 0 0; pointer-events: none } .cu-list.grid>.cu-item text { display: block; margin-top: 10rpx; color: #888; font-size: 26rpx; line-height: 40rpx } .cu-list.grid>.cu-item [class*=cuIcon] { position: relative; display: block; margin-top: 20rpx; width: 100%; font-size: 48rpx } .cu-list.grid>.cu-item .cu-tag { right: auto; left: 50%; margin-left: 20rpx } .cu-list.grid { background-color: var(--white); text-align: center } .cu-list.grid.no-border>.cu-item { padding-top: 10rpx; padding-bottom: 20rpx } .cu-list.grid.no-border>.cu-item:after { border: none } .cu-list.grid.no-border { padding: 20rpx 10rpx } .cu-list.grid.col-3>.cu-item:nth-child(3n):after, .cu-list.grid.col-4>.cu-item:nth-child(4n):after, .cu-list.grid.col-5>.cu-item:nth-child(5n):after { border-right-width: 0 } .grid { display: flex; flex-wrap: wrap; } .grid.col-1>view { width: 100%; } .grid.col-2>view { width: 50%; } .grid.col-3>view { width: 33.33%; } .grid.col-4>view { width: 25%; } .grid.col-5>view { width: 20%; }