/*
* @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. selenium java读取csv文件 (数据驱动)

    javacsv2.1 下载地址:http://sourceforge.net/projects/javacsv/files/ 该链接可以下载java读取csv文件的jar 包.下载之后解压找到对应的. ...

  2. docker从零开始 存储(四)tmpfs挂载

    使用tmpfs挂载 volume和bind mounts允许您在主机和容器之间共享文件,以便即使在容器停止后也可以保留数据. 如果你在Linux上运行Docker,你有第三个选择:tmpfs moun ...

  3. hdu 1932(spfa)

    XYZZY Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 3694   Accepted: 1059 Description ...

  4. 详解nginx、php-fpm和mysql用户权限

    通常情况下,我们运行web应用的服务器有CentOS.Ubuntu.Debian等等的Linux发行版本.这时候,构成服务架构所必须的Nginx.php和MySQL等应用的权限控制就显得非常重要,各个 ...

  5. 如何正确学习web前端流程以及如何找工作

    解释一下web前端工作是做啥的,Web前端开发工程师,主要职责是利用(X)HTML/CSS/JavaScript/Flash等各种Web技术进行客户端产品的开发.完成客户端程序(也就是浏览器端)的开发 ...

  6. sublime text3插件TrailingSpaces无法使用的解决方法

    TrailingSpaces是很好用的一款插件,可以清除代码结尾打多了几个空格或Tab,对于代码洁癖绝对是个福音,我的sublime text3本来安装了这款插件,也可以正常使用,今天突然不能用了,即 ...

  7. 【互动问答分享】第10期决胜云计算大数据时代Spark亚太研究院公益大讲堂

    “决胜云计算大数据时代” Spark亚太研究院100期公益大讲堂 [第10期互动问答分享] Q1:Spark on Yarn的运行方式是什么? Spark on Yarn的运行方式有两种:Client ...

  8. CF 1006B Polycarp's Practice【贪心】

    Polycarp is practicing his problem solving skill. He has a list of n problems with difficulties a1,a ...

  9. ASP.NET Core 2.2 基础知识(四) URL重写中间件

    说到URL重写就不得不提URL重定向. URL重定向 URL重定向是客户端操作,指示客户端访问另一个地址的资源.这需要往返服务器,并且当客户端对资源发出请求时,返回客户端的重定向URL会出现在浏览器的 ...

  10. [POI2001]Peaceful Commission

    题目大意: 有n个国家要派代表开会,每个国家有两个代表可供选择. 有m对代表有仇,不能同时开会. 若每个国家只能派一个代表开会,问是否存在一种方案,使得每个国家都能正常参会? 如果有,输出字典序最小的 ...