1. @charset "utf-8";
  2. @import "compass/css3/inline-block";
  3. @import "compass/css3/border-radius";
  4. @import "compass/utilities/sprites";
  5. @import "compass/utilities/general";
  6.  
  7. @mixin position($top,$right,$bottom,$left) {
  8. top: $top;
  9. right: $right;
  10. bottom: $bottom;
  11. left: $left;
  12. }
  13. //尺寸
  14. @mixin mySize($width,$height:$width) {
  15. width: $width;
  16. height: $height;
  17. }
  18.  
  19. /*行高,兼容IE8*/
  20. @mixin lineHeight($value) {
  21. line-height: $value;
  22. line-height: $value \9
  23. ;
  24. line-height: $value \0
  25. ;
  26. }
  27.  
  28. //背景透明,文字不透明。兼容IE8
  29. @mixin betterTransparentize($color, $alpha) {
  30. $c: rgba($color, $alpha);
  31. $ie_c: ie_hex_str($c);
  32. background: rgba($color, 1);
  33. background: $c;
  34. background: transparent \9
  35. ;
  36. zoom:;
  37. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie_c}, endColorstr=#{$ie_c});
  38. -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie_c}, endColorstr=#{$ie_c})";
  39. }
  40.  
  41. //添加浏览器前缀
  42. @mixin browserPrefix($propertyName,$value) {
  43. @each $prefix in -webkit-, -moz-, -ms-, -o-, '' {
  44. #{$prefix}#{$propertyName}: $value;
  45. }
  46. }
  47.  
  48. //最小高度
  49. @mixin minHeight($height) {
  50. min-height: $height;
  51. height: auto !important;
  52. @if $legacy-support-for-ie {
  53. _height: $height;
  54. }
  55. }
  56.  
  57. //固定宽度子元素,水平垂直居中
  58. @mixin center($width:null,$height:null) {
  59. @if $width and $height {
  60. position: absolute;
  61. left: 50%;
  62. top: 50%;
  63. display: block;
  64. margin-left: -($width/2);
  65. margin-top: -($height/2);
  66. }
  67. //@if not $width and not $height {
  68. // @include browserPrefix(transform,translate(-50%, -50%));
  69. //} @else if $width and $height {
  70. // margin: -($width / 2) #{0 0} -($height / 2);
  71. //} @else if not $height {
  72. // width: $width;
  73. // margin-left: -($width / 2);
  74. // @include browserPrefix(transform,translateY(-50%));
  75. //} @else {
  76. // margin-top: -($height / 2);
  77. // @include browserPrefix(transform,translateX(-50%));
  78. //}
  79. }
  80.  
  81. //圆角,兼容IE8
  82. @mixin radius($value) {
  83. @include border-radius($value);
  84. -ms-behavior: url(./css/PIE-1.0.0/PIE.htc);
  85. }

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. Virtualbox网络设置和无UI启动

    因工作需要,在Macbook上安装Ubuntu 14.04.2虚拟机,需要ssh连接操作. 一番查找资料,实践后可以正常工作了,记录一些信息以备用 无UI启动虚拟机,可使用以下命令: VBoxMana ...

  2. WSDL

    WSDL 彻底理解webservice SOAP WSDL WSDL 详解 http://www.cnblogs.com/hujian/p/3494064.html http://www.cnblog ...

  3. 数据库表 copy

    db1为原数据库,db2为要导出到的数据库,fromtable 是要导出的表名 1.方法一:登录导出到的数据库,执行create table fromtable select * from db1.f ...

  4. 【面试题】Round A China New Grad Test 2014总结

    我也有够懒的,今天才跑来写总结,自觉面壁中… 上一篇是Practice Round,今天是Round A,五道题. 每次做完都想说,其实题不难..但在做的过程中总是会各种卡,只有自己一行一行实现了,才 ...

  5. ZOJ3238 Water Ring(计算几何)

    题意:给你一个圆形和很多个矩形,然后要你求圆形的圆周有多少被矩形覆盖. 思路:比赛的时候是有思路的了,不过一直在调别的题,最后剩下30分钟肯定来不及敲.想法是这样的,要是我们可以求出每个矩形覆盖了圆周 ...

  6. HDU 4006 The kth great number(multiset(或者)优先队列)

    题目 询问第K大的数 //这是我最初的想法,用multiset,AC了——好吧,也许是数据弱也有可能 //multiset运用——不去重,边插入边排序 //iterator的运用,插入的时候,如果是相 ...

  7. iOS第三方地图-百度地图定位的封装

    // // BaiduMapTools.h // baidumapTest // // Created by apple on 15/8/26. // Copyright (c) 2015年 tqh. ...

  8. POJ 2027

    #include<iostream> using namespace std; int main() { int time; cin>>time; int a; int b; ...

  9. ExtJs之Ext.isEmpty

    <!DOCTYPE html> <html> <head> <title>ExtJs</title> <meta http-equiv ...

  10. C#打开得到路径

    FolderBrowserDialog path = new FolderBrowserDialog(); path.ShowDialog(); MessageBox.Show(path.Select ...