CSS - 乱炖一

2017-03-06  本文已影响8人  ITtian
input {
    margin: -20px 0;
    padding: 0;
    width: 100px;
    opacity: 0;
}
width:浏览器可视宽度。
height:浏览器可视高度。
device-width:设备屏幕的宽度。
device-height:设备屏幕的高度。
orientation:检测设备目前处于横向还是纵向状态。
aspect-ratio:检测浏览器可视宽度和高度的比例。(例如:aspect-ratio:16/9)
device-aspect-ratio:检测设备的宽度和高度的比例。
color:检测颜色的位数。(例如:min-color:32就会检测设备是否拥有32位颜色)
color-index:检查设备颜色索引表中的颜色,他的值不能是负数。
monochrome:检测单色楨缓冲区域中的每个像素的位数。(这个太高级,估计咱很少会用的到)
resolution:检测屏幕或打印机的分辨率。(例如:min-resolution:300dpi或min-resolution:118dpcm)。
grid:检测输出的设备是网格的还是位图设备。

example

@media (min-width: 800px) and (max-width: 1000px)
width:30px;
height:30px;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
.clearfix{
zoom: 1;

  &:before, &:after {
    content: '';
    display: table;
  }

  &:after {
    height: 0;

    font-size: 0;

    clear: both;
    visibility: hidden;
  }
}
//前面放英文,后面放中文,碰到英文时会优先使用Arial解析,但碰到中文时,Arial解析不了,这时就使用后面的Simhei(黑体的英文写法)解析
font-family:Arial,Simhei
1,Sass的安装需要Ruby环境,是在服务端处理的,而Less是需要引入less.js来处理Less代码输出css到浏览器,也可以在开发环节使用Less,然后编译成css文件,直接放到项目中
2,Less是@,而Scss是$
上一篇 下一篇

猜你喜欢

热点阅读