/*
* @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. python中的with与上下文管理器

    #转载请留言联系 很多人平时需要打开文件进行读取写入操作时,通常这样: f = open('文件路径','w') f.write(data) f.close 这样写有一个潜在的问题,如果在调用 wri ...

  2. Django基础之视图

    Django的View(视图) 一个视图函数(类),简称视图,是一个简单的Python 函数(类),它接受Web请求并且返回Web响应. 响应可以是一张网页的HTML内容,一个重定向,一个404错误, ...

  3. Qt笔记——Event

    #ifndef MYBUTTON_H #define MYBUTTON_H #include <QPushButton> class MyButton : public QPushButt ...

  4. MYSQL 的异常CRASH事件处理

    检查问题的过程****************************************************************************************** ps ...

  5. 洛谷 P1598 垂直柱状图【字符串】

    题目描述 写一个程序从输入文件中去读取四行大写字母(全都是大写的,每行不超过72个字符),然后用柱状图输出每个字符在输入文件中出现的次数.严格地按照输出样例来安排你的输出格式. 输入输出格式 输入格式 ...

  6. HDU 2523 sort (hash)

    #include<iostream> #include<cstring> #include<cmath> #include<cstdio> using ...

  7. hdu4757(可持久化 Trie )

    hdu4757 题意 给出一棵树,每个节点有权值,每次查询节点 \((u, v)\) 以及 \(x\) ,问 \(u\) 到 \(v\) 路径上的某个节点与 \(x\) 异或最大的值是多少. 分析 T ...

  8. POJ 1236 Network of Schools(SCC)

    [题目链接] http://poj.org/problem?id=1236 [题目大意] 给出一张有向图,问需要从几个起点出发才能遍历全图, 如果要求从任何一个点出发都能遍历全图,那么最少需要增加几条 ...

  9. POJ 3180 The Cow Prom(SCC)

    [题目链接] http://poj.org/problem?id=3180 [题目大意] N头牛,M条有向绳子,能组成几个歌舞团?要求顺时针逆时针都能带动舞团内所有牛. [题解] 等价于求点数大于1的 ...

  10. 【DFS】Gym - 101142C - CodeCoder vs TopForces

    就按照题意建出有向图来(n个点,2n-2条边),然后从按随便一个rating排序,从最后一个开始dfs,用vis数组防止重复访问,因为每次之前的肯定能访问之后的(及之后的能访问的),所以不会有重复.就 ...