sass 常用函数的整理
- @charset "utf-8";
- @import "compass/css3/inline-block";
- @import "compass/css3/border-radius";
- @import "compass/utilities/sprites";
- @import "compass/utilities/general";
- @mixin position($top,$right,$bottom,$left) {
- top: $top;
- right: $right;
- bottom: $bottom;
- left: $left;
- }
- //尺寸
- @mixin mySize($width,$height:$width) {
- width: $width;
- height: $height;
- }
- /*行高,兼容IE8*/
- @mixin lineHeight($value) {
- line-height: $value;
- line-height: $value \9
- ;
- line-height: $value \0
- ;
- }
- //背景透明,文字不透明。兼容IE8
- @mixin betterTransparentize($color, $alpha) {
- $c: rgba($color, $alpha);
- $ie_c: ie_hex_str($c);
- background: rgba($color, 1);
- background: $c;
- background: transparent \9
- ;
- zoom:;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie_c}, endColorstr=#{$ie_c});
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie_c}, endColorstr=#{$ie_c})";
- }
- //添加浏览器前缀
- @mixin browserPrefix($propertyName,$value) {
- @each $prefix in -webkit-, -moz-, -ms-, -o-, '' {
- #{$prefix}#{$propertyName}: $value;
- }
- }
- //最小高度
- @mixin minHeight($height) {
- min-height: $height;
- height: auto !important;
- @if $legacy-support-for-ie {
- _height: $height;
- }
- }
- //固定宽度子元素,水平垂直居中
- @mixin center($width:null,$height:null) {
- @if $width and $height {
- position: absolute;
- left: 50%;
- top: 50%;
- display: block;
- margin-left: -($width/2);
- margin-top: -($height/2);
- }
- //@if not $width and not $height {
- // @include browserPrefix(transform,translate(-50%, -50%));
- //} @else if $width and $height {
- // margin: -($width / 2) #{0 0} -($height / 2);
- //} @else if not $height {
- // width: $width;
- // margin-left: -($width / 2);
- // @include browserPrefix(transform,translateY(-50%));
- //} @else {
- // margin-top: -($height / 2);
- // @include browserPrefix(transform,translateX(-50%));
- //}
- }
- //圆角,兼容IE8
- @mixin radius($value) {
- @include border-radius($value);
- -ms-behavior: url(./css/PIE-1.0.0/PIE.htc);
- }
sass 常用函数的整理的更多相关文章
- PHP数组常用函数分类整理
一.数组操作的基本函数数组的键名和值array_values($arr); 获得数组的值array_keys($arr); 获得数组的键名array_flip($arr); 数组中的值与键名互换 ...
- python常用函数用法整理
1,zeros函数(同理的还有ones函数) http://www.jb51.net/article/127649.htm 注意: (m,n)是生成m行n列的矩阵,但要生成二维矩阵的时候要用两层括号, ...
- 【Sass/SCSS】我花4小时整理了的Sass的函数
[Sass/SCSS]我花4小时整理了的Sass的函数 博客说明 文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢! 说明 Sass 定义了各 ...
- NiosII常用函数整理
NiosII常用函数整理 IO操作函数函数原型:IORD(BASE, REGNUM) 输入参数:BASE为寄存器的基地址,REGNUM为寄存器的偏移量函数说明:从基地址为BASE的设备中读取寄存器中偏 ...
- pandas 常用函数整理
pandas常用函数整理,作为个人笔记. 仅标记函数大概用途做索引用,具体使用方式请参照pandas官方技术文档. 约定 from pandas import Series, DataFrame im ...
- oracle常用函数整理
oracle常用函数整理 1.绝对值.取余.判断数值正负函数 绝对值:ABS(n) 示例: SELECT ABS(100),ABS(-100),ABS('100') FROM ...
- phpcms V9 常用函数 及 代码整理
常用函数 及 常用代码 总结如下 <?php //转换字符串或者数组的编码 str_charset($in_charset, $out_charset, $str_or_arr) //获取菜单 ...
- phpcms(3) V9 常用函数 及 代码整理(转)
转自http://www.cnblogs.com/Braveliu/p/5103918.html 常用函数 及 常用代码 总结如下 <;?php //转换字符串或者数组的编码 str_chars ...
- 学生选课数据库SQL语句45道练习题整理及mysql常用函数(20161019)
学生选课数据库SQL语句45道练习题: 一. 设有一数据库,包括四个表:学生表(Student).课程表(Course).成绩表(Score)以及教师信息表(Teacher).四 ...
随机推荐
- Virtualbox网络设置和无UI启动
因工作需要,在Macbook上安装Ubuntu 14.04.2虚拟机,需要ssh连接操作. 一番查找资料,实践后可以正常工作了,记录一些信息以备用 无UI启动虚拟机,可使用以下命令: VBoxMana ...
- WSDL
WSDL 彻底理解webservice SOAP WSDL WSDL 详解 http://www.cnblogs.com/hujian/p/3494064.html http://www.cnblog ...
- 数据库表 copy
db1为原数据库,db2为要导出到的数据库,fromtable 是要导出的表名 1.方法一:登录导出到的数据库,执行create table fromtable select * from db1.f ...
- 【面试题】Round A China New Grad Test 2014总结
我也有够懒的,今天才跑来写总结,自觉面壁中… 上一篇是Practice Round,今天是Round A,五道题. 每次做完都想说,其实题不难..但在做的过程中总是会各种卡,只有自己一行一行实现了,才 ...
- ZOJ3238 Water Ring(计算几何)
题意:给你一个圆形和很多个矩形,然后要你求圆形的圆周有多少被矩形覆盖. 思路:比赛的时候是有思路的了,不过一直在调别的题,最后剩下30分钟肯定来不及敲.想法是这样的,要是我们可以求出每个矩形覆盖了圆周 ...
- HDU 4006 The kth great number(multiset(或者)优先队列)
题目 询问第K大的数 //这是我最初的想法,用multiset,AC了——好吧,也许是数据弱也有可能 //multiset运用——不去重,边插入边排序 //iterator的运用,插入的时候,如果是相 ...
- iOS第三方地图-百度地图定位的封装
// // BaiduMapTools.h // baidumapTest // // Created by apple on 15/8/26. // Copyright (c) 2015年 tqh. ...
- POJ 2027
#include<iostream> using namespace std; int main() { int time; cin>>time; int a; int b; ...
- ExtJs之Ext.isEmpty
<!DOCTYPE html> <html> <head> <title>ExtJs</title> <meta http-equiv ...
- C#打开得到路径
FolderBrowserDialog path = new FolderBrowserDialog(); path.ShowDialog(); MessageBox.Show(path.Select ...