@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 常用函数的整理的更多相关文章

  1. PHP数组常用函数分类整理

    一.数组操作的基本函数数组的键名和值array_values($arr);  获得数组的值array_keys($arr);  获得数组的键名array_flip($arr);  数组中的值与键名互换 ...

  2. python常用函数用法整理

    1,zeros函数(同理的还有ones函数) http://www.jb51.net/article/127649.htm 注意: (m,n)是生成m行n列的矩阵,但要生成二维矩阵的时候要用两层括号, ...

  3. 【Sass/SCSS】我花4小时整理了的Sass的函数

    [Sass/SCSS]我花4小时整理了的Sass的函数 博客说明 文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢! 说明 Sass 定义了各 ...

  4. NiosII常用函数整理

    NiosII常用函数整理 IO操作函数函数原型:IORD(BASE, REGNUM) 输入参数:BASE为寄存器的基地址,REGNUM为寄存器的偏移量函数说明:从基地址为BASE的设备中读取寄存器中偏 ...

  5. pandas 常用函数整理

    pandas常用函数整理,作为个人笔记. 仅标记函数大概用途做索引用,具体使用方式请参照pandas官方技术文档. 约定 from pandas import Series, DataFrame im ...

  6. oracle常用函数整理

    oracle常用函数整理    1.绝对值.取余.判断数值正负函数    绝对值:ABS(n)        示例: SELECT ABS(100),ABS(-100),ABS('100') FROM ...

  7. phpcms V9 常用函数 及 代码整理

    常用函数 及 常用代码 总结如下 <?php //转换字符串或者数组的编码 str_charset($in_charset, $out_charset, $str_or_arr) //获取菜单 ...

  8. phpcms(3) V9 常用函数 及 代码整理(转)

    转自http://www.cnblogs.com/Braveliu/p/5103918.html 常用函数 及 常用代码 总结如下 <;?php //转换字符串或者数组的编码 str_chars ...

  9. 学生选课数据库SQL语句45道练习题整理及mysql常用函数(20161019)

    学生选课数据库SQL语句45道练习题: 一.            设有一数据库,包括四个表:学生表(Student).课程表(Course).成绩表(Score)以及教师信息表(Teacher).四 ...

随机推荐

  1. Java读取图片并修改像素,创建图片

    public void replaceImageColor(String file, Color srcColor, Color targetColor) throws IOException{ UR ...

  2. mysql存储过程和函数使用实例

    1.需求:根据输入的年份,月份,和当前系统的年份比较,不满1年按1年计算,多出1年11个月也按1年计算. 2.计算得出来的使用年份,计算车辆残值. 3.存储过程 DELIMITER $$ USE `d ...

  3. HDU3507 Print Article(斜率优化dp)

    前几天做多校,知道了这世界上存在dp的优化这样的说法,了解了四边形优化dp,所以今天顺带做一道典型的斜率优化,在百度打斜率优化dp,首先弹出来的就是下面这个网址:http://www.cnblogs. ...

  4. Javascript实现 图片的无缝滚动

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  5. 开源DBCP、C3P0、Proxool 、 BoneCP连接池的比较

    简介 项目主页 使用评价  DBCP DBCP是一个依赖Jakarta commons-pool对象池机制的数据库连接池.DBCP可以直接的在应用程序用使用 http://homepages.nild ...

  6. 从.NET 1.1 升级到.NET 4.0 遇到 线程间操作无效: 从不是创建控件 [XX] 的线程访问它.

    有两种方式解决 1.在窗体构造函数中写Control.CheckForIllegalCrossThreadCalls =false;2.使用Invoke等委托函数 问题原因是 .NET2.0 以后拒绝 ...

  7. Dev 统计GridControl界面上当前选中的一行的值

    private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChang ...

  8. WordPress主题制作教程10:添加文章类型插件Custom Post Type UI

    下载 Custom Post Type UI>> 用Custom Post Type UI添加自定义文章类型对于新手来说最简单不过了,下载安装后,在插件栏启用一下,就可以开始添加文章类型了 ...

  9. c语言结构体赋值问题

    对于结构体赋值问题: static psl{ int a; char ch; }; 我过去一般会对结构体这样赋值: static psl pslname = { , 'b', }; 记住有一点,‘b’ ...

  10. jQuery常见面试题(转)

    代码以jQuery 1.83 为例 一 :Q: What is the difference between .get(), [], and .eq()? A: eq返回原生jQuery对象,截取某些 ...