顔色

sass顔色变量声明

在vue中声明颜色变量时需要在 vue.config.js 里面增加如下配置。
module.exports = {    // ...    css: { sourceMap: true, loaderOptions: { sass: { prependData: `@import "@/assets/styles/variable.scss";` } } }}
主题色
    $color-red: #ff3333;$color-purple: #ff33a9;$color-orange: #ff8833;$color-blue: #3377ff;
文字色
    $color-black: #000;$color-dark: #333;$color-deep: #555;$color-pl: #999999;$color-weak: #B3B3B3;$color-white: #fff;

####### 背景色

    $bg-bar: #F9F9F9;$bg-page: #F3F3F3;$bg-page-light: #F9F9F9;

颜色样式,需使用颜色变量

.bg-red {background-color: $color-red !important;}.bg-purple {background-color: $color-purple !important;}.bg-orange {background-color: $color-orange !important;}.bg-blue {background-color: $color-blue !important;}.color-red {color: $color-red !important;}.color-purple {color: $color-purple !important;}.color-orange {color: $color-orange !important;}.color-blue {color: $color-blue !important;}.text-black {color: #000;}.text-dark {color: #333;}.text-deep {color: #555;}.text-weak {color: #B3B3B3;}.text-white {color: #fff;}

字体

.f10 {font-size: 10px;}.f12 {font-size: 12px;}.f14 {font-size: 14px;}.f15 {font-size: 15px;}.f17 {font-size: 17px;}.f20 {font-size: 20px;}.f24 {font-size: 24px;}/* // 文字对齐 */.tl {text-align: left;}.tc {text-align: center;}.tr {text-align: right;}

浮动与清除浮动

    .fl {float: left;}.fr {float: right;}.fix {*zoom: 1;}.fix:after {display: table;content: '';clear: both;}

显示

    .dn {display: none;}.di {display: inline;}.db {display: block;}.dib {display: inline-block;}.dt {display: table;}div.dib {*display: inline;*zoom: 1;}.vm {vertical-align: middle;}.vib {display: inline-block;vertical-align: middle;}

定位

    .pr {position: relative;}.pa {position: absolute;}.pf {position: fixed;}

盒子模型

    .ml4 {margin-left: 4px;}.mr4 {margin-right: 4px;}.mt4 {margin-top: 4px;}.mb4 {margin-bottom: 4px;}.ml8 {margin-left: 8px;}.mr8 {margin-right: 8px;}.mt8 {margin-top: 8px;}.mb8 {margin-bottom: 8px;}.ml12 {margin-left: 12px;}.mr12 {margin-right: 12px;}.mt12 {margin-top: 12px;}.mb12 {margin-bottom: 12px;}.ml16 {margin-left: 16px;}.mr16 {margin-right: 16px;}.mt16 {margin-top: 16px;}.mb16 {margin-bottom: 16px;}.ml20 {margin-left: 20px;}.mr20 {margin-right: 20px;}.mt20 {margin-top: 20px;}.mb20 {margin-bottom: 20px;}.ml24 {margin-left: 24px;}.mr24 {margin-right: 24px;}.mt24 {margin-top: 24px;}.mb24 {margin-bottom: 24px;}.ml10 {margin-left: 10px;}.mr10 {margin-right: 10px;}.mt10 {margin-top: 10px;}.mb10 {margin-bottom: 10px;}.ml15 {margin-left: 15px;}.mr15 {margin-right: 15px;}.mt15 {margin-top: 15px;}.mb15 {margin-bottom: 15px;}

按钮禁用

    .disabled {outline: 0 none;cursor: default !important;opacity: .4;filter: alpha(opacity=40);-ms-pointer-events: none;pointer-events: none;}

CSS画圆半圆扇形三角梯形

div{margin: 50px;width: 100px;height: 100px;background: red;
}
/* 半圆 */
.half-circle{height: 50px;border-radius: 50px 50px 0 0;
}
/* 扇形 */
.sector{border-radius: 100px 0 0;
}
/* 三角 */
.triangle{width: 0px;height: 0px;background: none;border: 50px solid red;border-color: red transparent transparent transparent;
}
/* 梯形 */
.ladder{width: 50px;height: 0px;background: none;border: 50px solid red;border-color: red transparent transparent transparent;
}

初始化css样式代码、颜色、字体、浮动与清除浮动、显示、定位、盒子模型、按钮禁用、CSS画圆半圆扇形三角梯形相关推荐

  1. CSS画圆半圆扇形三角梯形

    直接上代码: div{margin: 50px;width: 100px;height: 100px;background: red; } /* 半圆 */ .half-circle{height: ...

  2. css宋体代码_css字体样式

    css字体样式 font-size : 字体大小 font-size属性用于设置字号,该属性的值可以使用相对单位长度,也可以使用绝对单位长度. 相对长度单位 说明 em 相对当前对象内文本的字体尺寸 ...

  3. 设计网页字体css,CSS样式设计网页字体与用户体验

    CSS样式设计网页字体与用户体验 互联网   发布时间:2009-04-02 19:36:06   作者:佚名   我要评论 网页制作Webjx文章简介:在设计网页时,没有比页面的外观更重要的了.所以 ...

  4. css样式的颜色表达方式+彩虹小人

    css样式的颜色表达方式+彩虹小人 css样式的颜色表达方式有三种. 第一种就是直接用英文的颜色来表达. 第二种就是通过16进制来表示,具体的颜色是什么样的代码,请自行解决,我也不知道,我是通过在火狐 ...

  5. 我优化了李笑来的MarkdownHere,附css样式代码,文章排版再也不用愁了

    Markdownhere 是李笑来制作的一套 CSS 主题,已开源在 GitHub 上,对于中文的显示效果比较友好,字距.行距比直接套用英文模板更加自然,是为数不多的优质中文 CSS 主题. 使用Ma ...

  6. 微软雅黑html中怎么写,css样式怎么设置字体为微软雅黑?

    css样式怎么设置字体为微软雅黑?下面本篇文章就来给大家介绍一下使用CSS设置字体为微软雅黑的方法.有一定的参考价值,有需要的朋友可以参考一下,希望对大家有所帮助. 首先要了解css中是如何控制字体的 ...

  7. css变成块级元素_设置标签的css样式代码为“display:block”,标签将变为块级元素。( )...

    设置标签的css样式代码为"display:block",标签将变为块级元素.( ) 答:对 青藏高原常见垫状植物有( ? ? ). 答:垫状点地梅 甘肃蚤缀.垫状棘豆 垫状驼绒藜 ...

  8. 基于HTTP浏览器缓存机制全面解析看Table表格的css样式代码详解

    文章来源: 学习通http://www.bdgxy.com/ 普学网http://www.boxinghulanban.cn/ 智学网http://www.jaxp.net/ 漂亮的table表格样式 ...

  9. 根据html除去多余css样式在线,利用css-redundancy-checker去除冗余、无用、废弃的css样式代码...

    背景 为网站写CSS样式的时候,经常会遇到CSS样式的修改或者网页设计的改变,而这些网页在经过无数次的修改之后,可能有些样式已经用不到了,css文件中可能存在着一些没用的CSS代码.这些无用的CSS代 ...

最新文章

  1. 2021年度人类社会发展十大科学问题发布
  2. 添加一个hello wrold系统调用到内核
  3. Java输入光标在printf前面_C++ 设置控制台(命令行)窗口 光标位置,及前背景颜色
  4. java模块是什么6_Java 9 揭秘(6. 封装模块)
  5. QT的QShortcut类的使用
  6. spring mysql 多数据源_spring框架学习【多数据源配置】
  7. IIS 配置 PHP 环境搭建:web 文件管理器
  8. 嵌入式linux交叉开发环境,构建嵌入式Linux交叉开发环境
  9. 蓝牙键盘常用快捷键记录
  10. Warning One or more files are in a conflicted state.
  11. 一篇个人原厂的非主流火星文
  12. 示例-Luat示例-HTTP
  13. TBTOOLS的使用:用TBTOOLS实现多序列比对
  14. Network Stack Specialization for Performance
  15. PMP试题 | 每日一练,快速提分 8.6
  16. CodeLab:Android fundamentals 04.2:Input controls
  17. 微信小程序链接后台接口,进行数据交互
  18. 学习笔记59—收藏这7个在线配色神器,再也不愁配色灵感了
  19. OpenGL超级宝典的例子Triangle
  20. Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li

热门文章

  1. 只要11天,浓度1000倍的抗生素也无效,“超级细菌”将成人类的最大威胁之一...
  2. 签名算法:SHA1withRSA
  3. 【PCIe 6.0】PCIe Shared Flow Control (1) - 简介
  4. python sql注入检测_在源代码中检测SQL注入
  5. 一个java类只能有一个public类,但可以定义多个非public类
  6. 暴力摩托(NDK1045)
  7. 狗指甲修剪器的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告
  8. Android Studio Build.gradle详细配置说明
  9. SAP PP MRP控制参数说明
  10. hyperledger fabric 2.3.3 测试网络