css - 小程序样式
/*
* @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.微信小程序的样式设置统一在每一页的.wxss的样式文件中,所有的样式设置代码统一写入这个文件中: 2.样式主要是通过.wxml里面控件的“class”属性来调用,此处调用会有几个细节要注意: 1) ...
- 微信小程序样式wxss各种问题总结(不断更新)
1)加入其它样式文件 @import '/css/dialog.wxss'; //注意:必须结尾用分号 2)隐藏滚动条 ::-webkit-scrollbar { width:; height:; c ...
- 微信小程序样式旋转
相关文档:http://www.w3school.com.cn/cssref/pr_transform.asp index.wxss文件 注意:如果是web前端,要注意浏览器的兼容性 .x1{ wid ...
- 微信小程序初使心得【微信小程序快速入门】
摘要: 2016年推出微信小程序,时至今日,历经几个版本的更新,已形成了相对实用和稳定的服务平台.本文简单的介绍了微信小程序的入门用法,今后会继续关注和实践. 2016年推出微信小程序,时至今日,历经 ...
- Taro 多端开发的正确姿势:打造三端统一的网易严选(小程序、H5、React Native)
笔者所在的趣店 FED 早在去年 10 月份就已全面使用 Taro 框架开发小程序(当时版本为 1.1.0-beta.4),至今也上线了 2 个微信小程序.2 个支付宝小程序. 之所以选用 Taro, ...
- 微信小程序踩坑集合
1:官方工具:https://mp.weixin.qq.com/debug/w ... tml?t=1476434678461 2:简易教程:https://mp.weixin.qq.com/debu ...
- 小程序开发总结一:mpvue框架及与小程序原生的混搭开发
mpvue-native:小程序原生和mpvue代码共存 问题描述 mpvue和wepy等框架是在小程序出来一段时间之后才开始有的,所以会出现的问题有:需要兼容已有的老项目,有些场景对小程序的兼容要求 ...
- 微信、小程序开发UI库--weui
一.weui可以开发微信内网页.微信小程序,二者使用的UI库不一样 1. 微信内网页样式文件为 .css文件 链接地址:https://weui.io/ weui-js库: weu ...
- 从微信小程序开发者工具源码看实现原理(四)- - 自适应布局
从前面从微信小程序开发者工具源码看实现原理(一)- - 小程序架构设计可以知道,小程序大部分是通过web技术进行渲染的,也就是最终通过浏览器的dom tree + cssom来生成渲染树:既然最终是通 ...
随机推荐
- MyBatis3-实现多表关联数据的查询
前提: 1.新建Article表和增加模拟数据,脚本如下: Drop TABLE IF EXISTS `article`; Create TABLE `article` ( `id` ) NOT NU ...
- poj 3608(旋转卡壳求解两凸包之间的最短距离)
Bridge Across Islands Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9768 Accepted: ...
- MATLAB求函数零点与极值
1. roots函数 针对多项式求零点(详见MATLAB多项式及多项式拟合) 2. fzero函数 返回一元函数在某个区间内的的零点. x0 = fzero(@(x)x.^2-3* ...
- AC日记——[FJOI2007]轮状病毒 bzoj 1002
1002 思路: 打表找规律: dp[i]=dp[i-1]*3-dp[i-2]+2; 套个高精就a了: 代码: #include <cstdio> #include <cstring ...
- 洛谷 P1068 分数线划定【结构体排序】
题目描述 世博会志愿者的选拔工作正在 A 市如火如荼的进行.为了选拔最合适的人才,A 市对 所有报名的选手进行了笔试,笔试分数达到面试分数线的选手方可进入面试.面试分数线根 据计划录取人数的150%划 ...
- Codeforces 702C Cellular Network(二分)
题目链接:http://codeforces.com/problemset/problem/702/C 题意: 在数轴上有N个城市和M个信号塔,给你这N个城市以及M个塔在数轴上的位置,求M个塔可以覆盖 ...
- 动态规划二:最长公共子序列(LCS)
1.两个子序列:X={x1,x2....xm},Y={y1,y2....yn},设Z={z1,z2...zk}. 2.最优子结构: 1)如果xm=yn ,则zk=xm=yn且Zk-1是Xm-1和Yn- ...
- MySQL逻辑架构简介
1.Connectors指的是不同语言中与SQL的交互2 Management Serveices & Utilities: 系统管理和控制工具3 Connection Pool: 连接池管理 ...
- 简单DP【p2758】编辑距离
Description 设A和B是两个字符串.我们要用最少的字符操作次数,将字符串A转换为字符串B.这里所说的字符操作共有三种: 1.删除一个字符: 2.插入一个字符: 3.将一个字符改为另一个字符: ...
- rsync用于同步目录
rsync是unix/linux下同步文件的一个高效算法,它能同步更新两处计算机的文件与目录,并适当利用查找文件中的不同块以减少数据传输.rsync中一项与其他大部分类似程序或协定中所未见的重要特性是 ...