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).四 ...
随机推荐
- hbase表结构设计
非常好的一个ppt HBase Schema design: http://www.slideshare.net/cloudera/5-h-base-schemahbasecon2012
- Unity Texture 2D Compress
测试了一下 unity 图片 对 apk 的影响. 上两种测试环境 1024 * 1024 带 alpha的话 默认压缩就是RBA 16bit就是2M 不带的话就是 etc 的话 ...
- Maven在项目中的应用
http://192.168.0.253:8081/nexus/#view-repositories;thirdparty~uploadPanel 使用局域网搭建的环境,输入用户名和密码登录,上传ja ...
- H5时代的新存储简介
1.WebStorage 分为:sessionStorage和localStorage两种,除了session的生命周期是在该域全部页面被关闭后就被清除而local是无限期存在外,二者的使用与方法属性 ...
- zoj 2358,poj 1775 Sum of Factorials(数学题)
题目poj 题目zoj //我感觉是题目表述不确切,比如他没规定xi能不能重复,比如都用1,那么除了0,都是YES了 //算了,这种题目,百度来的过程,多看看记住就好 //题目意思:判断一个非负整数n ...
- 使用Ninject来解决程序中组件的耦合问题
1.为什么要用Ninject? Ninject是一个IOC容器用来解决程序中组件的耦合问题,它的目的在于做到最少配置.其他的的IOC工具过于依赖配置文件,需要使用assembly-qualified名 ...
- Linux网络编程5——使用UDP协议实现群聊
引言 本文实现的功能类似于我之前所写的一篇博文(Linux之select系统调用_2),区别在于进程之间的通信方式有所不同.之前的文章中,我所使用的是管道,而本文我将会使用socket接口. 需求 客 ...
- 欧拉工程第51题:Prime digit replacements
题目链接 题目: 通过置换*3的第一位得到的9个数中,有六个是质数:13,23,43,53,73和83. 通过用同样的数字置换56**3的第三位和第四位,这个五位数是第一个能够得到七个质数的数字,得到 ...
- mq_close
NAME mq_close - 关闭一个消息队列 (REALTIME) SYNOPSIS #include <mqueue.h>int mq_close(mqd_t mqdes) DESC ...
- scp在Linux主机之间复制不用输入密码
把你的本地主机用户的ssh公匙文件复制到远程主机用户的~/.ssh/authorized_keys文件中,假设本地主机linux(10.1.1.1),远程主机linux(10.1.1.2) 一,在li ...