/*
* @Author: WJ_LONG
* @Date: 2018-09-15 17:25:37
* @Last Modified by: WJ_LONG
* @Last Modified time: 2018-09-15 17:30:53
* @animation-display-address:https://daneden.github.io/animate.css/ || http://ianlunn.github.io/Hover/
* @Use 小程序
* @更新:
表格:2018-09-05
图文:2018-09-15
*/ @charset "utf-8";
/* 这里可以用import导入各种库.... 例如:import "./animate.min.css"; */ input, textarea {
width: %;
} /* 文字 */ .t-white {
color: #fff;
} .t-black {
color: #;
} .t-blue {
color: #0E639C;
} .t-red {
color: #DD4F43;
} .t-green {
color: #1AA15F;
} .t-yellow {
color: #FFCD42;
} .t-orange {
color: #f18518;
} .t-bold {
font-weight: bold;
} .t-left {
text-align: left;
} .t-center {
text-align: center;
} .t-right {
text-align: right;
} /* 文字换行与不换行 */ .n-word {
word-break: break-all;
} .no-word {
word-break: nowrap;
} /* 背景 */ .bg-blue {
background-color: #038dd8;
} .bg-green {
background-color: #009b4d;
} .bg-yellow {
background-color: #fdd100;
} .bg-orange {
background-color: #f18518;
} .bg-red {
background-color: #d22a31;
} /* 图标 > */ .icon-direction {
width: .2em;
height: .2em;
border: 1px solid #;
border-top: none;
border-left: none;
transform: rotate(-45deg);
} /* 遮罩层-垂直居中 */ .ab-center {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: ;
bottom: ;
left: ;
right: ;
background-color: rgba(, , , .);
} /*
<view class="main-core">
<block wx:for="{{10}}" wx:key="id">
<navigator class="main-core-item" url="#">
<image class="core-item-icon" src="/images/core/bx.png"></image>
<text class="core-item-name">图文</text>
</navigator>
</block>
</view>
*/ /* 图文排序 */ .main-core {
display: flex;
flex-flow: row wrap;
align-content: flex-start;
background: #fff;
border-bottom: 1rpx solid #e5e5e5;
padding: 15rpx 10rpx 10rpx;
margin-bottom: 20rpx;
min-height: 350rpx;
overflow: hidden;
} /* 如果图文排序拥挤,调整百分比即可 => width30% */ .main-core navigator {
width: %;
} .main-core-item {
display: flex;
flex-flow: column wrap;
justify-content: center;
align-items: center;
box-sizing: border-box;
width: %;
height: 170rpx;
} .main-core-item.disabled {
color: #9c9c9c;
} .core-item-icon {
display: block;
width: 85rpx;
height: 85rpx;
margin: 15rpx auto;
} .core-item-name {
display: block;
margin: 5rpx;
} /* 表格代码 */ /* <view class='table'>
<view class='tr'>
<view class='th th1'>视频</view>
<view class='th th2'>游戏</view>
<view class='th th3'>电视</view> </view> <view class='tr'>
<view class='td td1'>1</view>
<view class='td td2'>2</view>
<view class='td td3'>3</view>
</view> <view class='tr'>
<view class='td td1'>1</view>
<view class='td td2'>2</view>
<view class='td td3'>3</view>
</view> <view class='tr'>
<view class='td td1'>1</view>
<view class='td td2'>2</view>
<view class='td td3'>3</view>
</view>
</view> */ .table {
width: %;
} .tr {
width: %;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #dadada;
} .tr .th1 {
background-color: #008bd5;
} .tr .th2 {
background-color: #ee8236;
} .tr .th3 {
background-color: #a40081;
} .th, .td {
padding: 10px;
text-align: center;
width: %;
} .th {
background-color: #;
font-size: .2em;
color: #fff;
} .td {
font-size: .9em;
color: #;
} .td1, .td2, .td3 {
word-break: break-all;
white-space: normal;
} /* 边框 */ .border-top {
border-top: 1px solid #;
} .border-right {
border-right: 1px solid #;
} .border-bottom {
border-bottom: 1px solid #;
} .border-left {
border-left: 1px solid #;
} .border {
border: 1px solid #;
} /* 显示-隐藏 */ .none {
display: none;
} .display {
display: block;
} .none-force {
display: none !important;
} /* 阴影(外部、内部阴影) */ .b-shadow {
box-shadow: #fdd000 10px;
} .t-shadow {
text-shadow: #ec350c 20px;
} /* 宽度 */ .w-100per {
width: %;
} .w-50per {
width: %;
} .h-100per {
height: %;
} .w-100vh {
width: 100vh;
} .h-100vh {
width: 100vh;
} /* 用户头像大小 */ .u- {
height: 70px;
width: 70px;
} .u- {
height: 50px;
width: 50px;
} /* 圆角 */ .r-50per {
border-radius: %;
} .r- {
border-radius: 10px;
} /*
前三分为:中、开始(默认),结束
*/ .f {
display: flex;
} .f-center {
justify-content: center;
} .f-start {
justify-content: flex-start;
} .f-end {
justify-content: flex-end;
} .f-s-b {
justify-content: space-between;
} .f-s-a {
justify-content: space-around;
} .f-no-wrap {
flex-wrap: nowrap;
} .f-wrap {
flex-wrap: wrap;
} /*
垂直居中(针对view先的元素 - align)
*/ .f-align-c {
align-items: center;
} .f-align-s {
align-items: flex-start;
} .f-align-e {
align-items: flex-end;
} .f-algin-b {
align-items: baseline;
} .f-align-stretch {
align-items: stretch;
} /* line-block 和 inline */ .i-line {
display: inline;
} .i-block {
display: inline-block;
} .block {
display: block;
} /* 定位 */ .p-r {
position: relative;
} .p-s {
position: absolute;
} .p-f {
position: fixed;
} .over-flow {
overflow: hidden;
} /* 内边距 */ .p-2per {
padding: %;
} .p-l-2per {
padding-left: %;
} .p-r-2per {
padding-right: %;
} .p-t-2per {
padding-top: %;
} .p-b-2per {
padding-bottom: %;
} /* 外边距 */ .m-2per {
padding: %;
} .m-tb-2per {
margin: % ;
} .m-lr-2per {
margin: %;
} .m-l-2per {
padding-left: %;
} .m-r-2per {
padding-right: %;
} .m-t-2per {
padding-top: %;
} .p-b-2per {
padding-bottom: %;
}

css - 小程序样式的更多相关文章

  1. 微信小程序学习笔记(1)-微信小程序样式设置逻辑

    1.微信小程序的样式设置统一在每一页的.wxss的样式文件中,所有的样式设置代码统一写入这个文件中: 2.样式主要是通过.wxml里面控件的“class”属性来调用,此处调用会有几个细节要注意: 1) ...

  2. 微信小程序样式wxss各种问题总结(不断更新)

    1)加入其它样式文件 @import '/css/dialog.wxss'; //注意:必须结尾用分号 2)隐藏滚动条 ::-webkit-scrollbar { width:; height:; c ...

  3. 微信小程序样式旋转

    相关文档:http://www.w3school.com.cn/cssref/pr_transform.asp index.wxss文件 注意:如果是web前端,要注意浏览器的兼容性 .x1{ wid ...

  4. 微信小程序初使心得【微信小程序快速入门】

    摘要: 2016年推出微信小程序,时至今日,历经几个版本的更新,已形成了相对实用和稳定的服务平台.本文简单的介绍了微信小程序的入门用法,今后会继续关注和实践. 2016年推出微信小程序,时至今日,历经 ...

  5. Taro 多端开发的正确姿势:打造三端统一的网易严选(小程序、H5、React Native)

    笔者所在的趣店 FED 早在去年 10 月份就已全面使用 Taro 框架开发小程序(当时版本为 1.1.0-beta.4),至今也上线了 2 个微信小程序.2 个支付宝小程序. 之所以选用 Taro, ...

  6. 微信小程序踩坑集合

    1:官方工具:https://mp.weixin.qq.com/debug/w ... tml?t=1476434678461 2:简易教程:https://mp.weixin.qq.com/debu ...

  7. 小程序开发总结一:mpvue框架及与小程序原生的混搭开发

    mpvue-native:小程序原生和mpvue代码共存 问题描述 mpvue和wepy等框架是在小程序出来一段时间之后才开始有的,所以会出现的问题有:需要兼容已有的老项目,有些场景对小程序的兼容要求 ...

  8. 微信、小程序开发UI库--weui

    一.weui可以开发微信内网页.微信小程序,二者使用的UI库不一样 1. 微信内网页样式文件为 .css文件  链接地址:https://weui.io/         weui-js库:  weu ...

  9. 从微信小程序开发者工具源码看实现原理(四)- - 自适应布局

    从前面从微信小程序开发者工具源码看实现原理(一)- - 小程序架构设计可以知道,小程序大部分是通过web技术进行渲染的,也就是最终通过浏览器的dom tree + cssom来生成渲染树:既然最终是通 ...

随机推荐

  1. ThreadLocal深度解析

    本文基于jdk1.8.0_66写成 0. ThreadLocal简介 ThreadLocal可以提供线程内的局部对象,合理的使用可以避免线程冲突的问题比方说SimpleDateFormat是线程不安全 ...

  2. Centos7源码编译安装tengine1.5.1

    安装依赖包 yum install pcre pcre-devel openssl openssl-devel gcc make zlib-devel wget -y 下载和创建用户 mkdir /t ...

  3. 训练指南 UVA - 11374(最短路Dijkstra + 记录路径 + 模板)

    layout: post title: 训练指南 UVA - 11374(最短路Dijkstra + 记录路径 + 模板) author: "luowentaoaa" catalo ...

  4. The 15th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple - M Lucky 7

    Lucky 7 Time Limit: 1 Second      Memory Limit: 65536 KB BaoBao has just found a positive integer se ...

  5. python aiohttp sancio 框架性能测试

    开头先啰嗦两句: 由于本人有开发一个博客的打算,所以近期开始选型python的web框架重头学习,选了两款非常火的 aio web框架 aiohttp 和 sancio 进行性能测试以及开发喜好的调研 ...

  6. Codechef ForbiddenSum

    Mike likes to invent new functions. The latest one he has invented is called ForbiddenSum. Let's con ...

  7. [Contest20180405]抑制「超我」

    古明地恋(koishi)和计算器(calculator)是好朋友.恋恋有一个神奇的计算器,可以进行两个数在模$2^n$意义下的加法运算.计算器上有一个寄存器,一开始寄存器中的数为$0$,每当恋恋输入一 ...

  8. Dom4jDemo应用-保存手机信息

    ---恢复内容开始--- import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStr ...

  9. FireDac Pooling

    1.建立FDManager的ConnectionDef.并设置此Pooling为True. 2.建立Thread类进行多个FDConnection连接DB. 3.本列是oracle远程数据.如下图: ...

  10. 【OpenJudge8464】【序列DP】股票买卖

    股票买卖 总时间限制: 1000ms 内存限制: 65536kB [描述] 最近越来越多的人都投身股市,阿福也有点心动了.谨记着“股市有风险,入市需谨慎”,阿福决定先来研究一下简化版的股票买卖问题. ...