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).四 ...
随机推荐
- Kerberos的组件和术语(翻译和注解)
之所以要翻译这篇文章,是因为提到了一些通常于对Kerberos协议简介性质的文章所没有提到的细节,而这些细节对于理解Kerberos的工作原理,以及Kerberos协议实现的使用都是很有必要的. 1. ...
- 移动MM failed to find resource file{mmiap.xml}
原地址:http://blog.csdn.net/alking_sun/article/details/36175861 在进行移动MM集成的时候总是会遇到一个bug: failed to find ...
- HDU 2846 Repository(字典树,标记)
题目 字典树,注意初始化的位置~!!位置放错,永远也到不了终点了org.... 我是用数组模拟的字典树,这就要注意内存开多少了,,要开的不大不小刚刚好真的不容易啊.... 我用了val来标记是否是同一 ...
- POJ 1656
#include<iostream>//chengdacaizi 08 .11. 12 #include<string> using namespace std; ][]={} ...
- 重温《js权威指南》 第7,8章
第七章 数组 数组是值的有序集合.js数组是无类型的,数组元素可以是任意类型,同一个数组中不同元素也可能有不同的类型.数组可以动态增长或缩减,创建时无须生命那个一个固定的大小并且数组大 ...
- hive-学习笔记
1.hive模糊搜索表 show tables like '*name*'; 2.查看表结构信息 desc formatted table_name; desc table_name; 3.查看 ...
- FreePascal经典资料
------------------------------------------------------------------------ 这是每个版本的changelog: http://bu ...
- Redis的Order Set操作
有序集合 zadd key score1 value1 score2 value2 .. 添加元素 127.0.0.1:6379> zadd class 12 lily 13 lucy 18 l ...
- 288. Unique Word Abbreviation
题目: An abbreviation of a word follows the form <first letter><number><last letter> ...
- 《Linux shell变量总结回顾》RHEL6(转)
文章版权:http://www.cnblogs.com/linux-super-meng/ 环境变量路径: [root@localhost ~]# set //查看到的是局部变量和全局变量2种 [ ...