_______________________________________________________________  css3 瀑布流 N 列
<ul><li>aaa</li><li>aaa</li></ul>
ul{-moz-column-count: 2;
-webkit-column-count: 2;
column-count: 2;}
ul li {

-moz-page-break-inside: avoid;
-webkit-column-break-inside: avoid;
break-inside: avoid;}
/*--------------------------------------   input框必填星号*垂直居中设置  -----------------------*/
<font color="red" style="position:relative; top:2px;">*</font>;&nbsp;功能名称
 /*--------------------------------------   字号小于12px  -----------------------*/
font-size:10px;-webkit-transform:scale(0.8);  *此时属性为 block / inline-block;
/*--------------------------------------- 阴影 x-offset x轴偏移y   blur 模糊值 color of shadow 阴影颜色 */
边框阴影:  -webkit-box-shadow: 1px 1px 3px #ccc;  -moz-box-shadow: 1px 1px 3px #ccc;  box-shadow: 1px 1px 3px #ccc;
边框下阴影:
-webkit-box-shadow: 0 5px 5px 0 rgba(50,50,50,0.1);
-moz-box-shadow: 0 5px 5px 0 rgba(50,50,50,0.1);
box-shadow: 0 5px 5px 0 rgba(50,50,50,0.1); 
右下阴影:box-shadow:2px 2px 5px #222;  //   box-shadow:1px 2px 7px #777;
边框发光:-webkit-box-shadow: 0 0 6px rgba(0, 0, 0, .3); -moz-box-shadow: 0 0 6px rgba(0, 0, 0, .3); box-shadow: 0 0 6px rgba(0, 0, 0, .3);  
 边框内阴影(单边)

-webkit-box-shadow:0px 3px 3px #c8c8c8 inset;
-moz-box-shadow:0px 3px 3px #c8c8c8 inset;
box-shadow:0px 3px 3px #c8c8c8 inset

文字阴影:  text-shadow:1px 1px 1px #000;

背景渐变:  background: -webkit-linear-gradient(#75828b,#5f6770);
放射渐变:  background:-webkit-gradient(radial,25 25,0,25 25,25,from(#fff),to(#ccc));
文字白边: text-shadow: 0 1px 1px #fff; 
滤镜(兼容IE):      filter:alpha(opacity=50);-moz-opacity:0.5;opacity:0.5;
滤镜CSS3            border:1px solid rgba(0,0,0,0.1); background:rgba(0, 0, 0, 0.8);
/*-------------------------------------- 文本域里的换行,展示时,显示出来  */
_______________________________________________________________  H5 两端对齐
详解flex: https://www.runoob.com/w3cnote/flex-grammar.html


             display: flex;           
             justify-content: space-between;
_______________________________________________________________ 保持一行,超出省略
width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
/*-- 多行省略*/
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
_______________________________________________________________ 奇数,偶数 
li:nth-child(odd)
li:nth-child(even)
或者:
li:nth-child(2n)
li:nth-child(2n+)
li:not(:nth-last-child(1)):not(:nth-last-child(2)) /*非最后2个*/
________________________________________________________________  H5 平均分,并居中

ul {
display: flex;
}
ul li {
flex: 1;
text-align:center;
}

// flex 九宫格

>ul{    background: #fff;
    display: flex;
    flex-direction: row; /**布局内item 方向*/
    flex-wrap: wrap; /**不够了就换行*/
    justify-content: space-between; /**主轴两边对其*/
    > li {
      display: flex;
      width: 33.33333%;
      height: 90px;
      justify-content: center;
      align-items: center;
      &:nth-child(3n) >a {
        border-right: none;
      }
      >a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
// 网格布局,平分3列,间隔左右10 上下15
ul {padding: 0 10px 10px;    display: grid;
>li {
grid-template-columns: repeat(3, 1fr); // 如果用33.3333会不准确
grid-gap: 10px;}}

________________________________________________  CSS 背景   移步到:https://blog.csdn.net/ssisse/article/details/51533943

________________________________________________       display:flex  移步到:https://blog.csdn.net/qq_35480270/article/details/79282947     http://www.cnblogs.com/lpy001/p/6062466.html

_______________________________________________________________ grid
<div class='grid'>
<a>grid01</a>
</div> .grid {
margin: 50px auto;
height: 300px;
width: 300px;
display: grid;
grid-template-rows: 100px 100px 100px;
grid-template-columns: 100px 100px 100px;
box-sizing: border-box;
> a {
margin-top: -4px;
margin-left: -4px;
box-sizing: border-box;
line-height: 100px;
text-align: center;
border: 4px solid #ccc;
}
}

——————————————————————————————————  解决html表格中内容超出不强制换行和超出宽度自动隐藏并显示省略号

table{
table-layout:fixed;/* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */
}
td{
width:%;
word-break:keep-all;/* 不换行 */
white-space:nowrap;/* 不换行 */
overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
}

.FM_customer_slideUp2 .cz_button ul{display:-webkit-box;display:-moz-box;display:box;}

.FM_customer_slideUp2 .cz_button ul li{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;text-align:center;height:40px;line-height:40px;}
如:

.test {display:-webkit-flex;display:flex;}
    .test li{-webkit-flex:1;flex:1;}
.test li:nth-child(1){background:#999;}
.test li:nth-child(2){background:#aaa;}
.test li:nth-child(3){background:#ccc;}
.test li:nth-child(4){background:#999;}
</style>
<ul class="test">
<li>写邮件</li>
<li>新增客户</li>
<li>新建商品</li>
<li>扫描名片</li>
</ul>
________________________________________________________________ 经过, 渐变色
a{ color: #666; 
-moz-transition: all 0.3s ease-out;
-webkit-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
transition: all 0.3s ease-out; 
}
a:hover {color: red}
________________________________________________________________  左右激变
background: -webkit-linear-gradient(left,transparent,#666);
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#000000), to(transparent));
background: -webkit-linear-gradient(#000000, transparent);
background: -moz-linear-gradient(#000000, transparent);
background: -ms-linear-gradient(#000000, transparent);
background: -o-linear-gradient(#000000, transparent);
background: linear-gradient(#000000, transparent);
-pie-background: linear-gradient(#000000, transparent);
________________________________________________________________  旋转动画
<style>
#imgg{animation:imgg 5s linear 0s infinite;}
@keyframes imgg{
0%{transform:rotateY(0deg);}
25%{transform:rotateY(90deg);}
50%{transform:rotateY(180deg);}
75%{transform:rotateY(270deg);}
100% {transform:rotateY(360deg);}
}
</style>
<div id="imgg">  aaa </div>
________________________________________________________________ 经过 翻牌效果,
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>css3 翻牌</title>
</head>
<body>
<style>
*{ margin:0; padding:0;}
ul,li{ list-style:none; margin:0; padding:0;}
.brandsShow{ width:1200px; height:620px; margin:0 auto; }
.brandsShow ul{ margin-left:-20px; width:1225px; height:auto; }
.brandsShow ul li{ float:left; display:inline; width:283px; height:283px; }
.flip-container {perspective: 1000;
-webkit-perspective: 1000px; /*父类容器中 perspective 子类允许透视*/
-moz-perspective: 1000px;
-ms-perspective: 1000px;
-o-perspective: 1000px;
perspective: 1000px;
margin:0px auto; float:left; margin-left:20px; margin-bottom:20px; border:1px solid #fff;}
.flip-container:hover .back {transform: rotateY(0deg); -webkit-transform: rotateY(0deg);-moz-transform: rotateY(0deg);-ms-transform: rotateY(0deg);-o-transform: rotateY(0deg); z-index:2;}
.flip-container:hover .front { transform: rotateY(180deg);-webkit-transform: rotateY(180deg);-moz-transform: rotateY(180deg);-ms-transform: rotateY(180deg);-o-transform: rotateY(180deg); z-index:1}
.flip-container, .front, .back {width: 283px;height: 283px;}
.flipper {transition:transform 0.6s ease-out;
transition: transform .5s ease-in-out;
-webkit-transition: transform .5s ease-in-out;
-moz-transition: transform .5s ease-in-out;
-ms-transition: transform .5s ease-in-out;
-o-transition: transform .5s ease-in-out;
-webkit-transform-style: preserve-3d; /*使其子类变换后得以保留 3d转换后的位置*/
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
display:block;position: relative;}
.front, .back {backface-visibility: hidden;transition: 0.6s ease-out;-webkit-transition: .6s ease-out; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; -ms-transform-style: preserve-3d;-o-transform-style: preserve-3d;transform-style: preserve-3d;position: absolute;top: 0;left: 0;}
.front img, .back img{ width:283px; height:283px; overflow:hidden;}
.front {z-index: 2;transform: rotateY(0deg);transform: rotateY(0deg); -webkit-transform: rotateY(0deg);-moz-transform: rotateY(0deg);-ms-transform: rotateY(0deg);-o-transform: rotateY(0deg);}
.back { z-index:1;transform: rotateY(-180deg);transform: rotateY(-180deg);-webkit-transform: rotateY(-180deg);-moz-transform: rotateY(-180deg);
-ms-transform: rotateY(-180deg);-o-transform: rotateY(-180deg);}
</style>
<ul>
<li class="flip-container " ontouchstart="this.classList.toggle('hover');">
<a href="brandLi.html" class="flipper">
<div class="front "><img src="data:images/pic/brand10.jpg">前面</div>
<div class="back " ><img src="data:images/pic/brand01.jpg">后面</div>
</a>
</li>
<li class="flip-container " ontouchstart="this.classList.toggle('hover');">
<a href="brandLi.html" class="flipper">
<div class="front "><img src="data:images/pic/brand10.jpg"></div>
<div class="back " ><img src="data:images/pic/brand01.jpg"></div>
</a>
</li>
</ul>
</body>
</html>
________________________________________________________________ 经过 360度旋转
@-webkit-keyframes btnRotate {
0% {
    -webkit-transform: rotateZ(0deg);
    }
100% {
    -webkit-transform: rotateZ(360deg);
    }
}
#startMenu button:hover img {
    -webkit-animation: btnRotate 1.5s linear infinite;   ---1 为旋转一圈
}
________________________________________________________________ 判断浏览器是否支持html5
<!-- 判断浏览器是否支持html5 -->
<div style="">你知道你的浏览器过时了吗?</div>
<script>
        window.onload = function() {
            if (window.applicationCache) {
                alert("你的浏览器支持HTML5");
            } else {
                alert("你的浏览器不支持HTML5");
            }
        }
    </script>  
<!-- 判断浏览器是否支持html5 -->
 

________________________________________________________________

一直写html4后来想试一下html5,然后发现IE9以下的浏览器不兼容html5标签,再网站搜索了一些解决办法,但是都会出现这样或那样的问题,比如说

<!--[if lt IE9]> 
<script> 
   (function() {
     if (! 
     /*@cc_on!@*/
     0) return;
     var e = "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output, progress, section, time, video".split(', ');
     var i= e.length;
     while (i--){
         document.createElement(e[i])
     } 
})() 
</script>
<![endif]-->

在ie8以下的浏览器中就会将<!--[if lt IE9]><![endif]-->这对标签给输出出来,

在此想问一下大家有没有什么更好的解决办?

<!--___________________________________________屏幕 适配-->

@media screen and (min-width:1920px){
 
}
@media screen and (min-width: 1280px) and (max-width: 1920px) {
}
@media screen and (min-width: 960px) and (max-width: 1279px) {
}
@media only screen and (min-width: 640px) and (max-width: 959px){
}
 
<!-- 通用CSS-->
    a,button,input,textarea,select,option,p,div{-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0;}
    body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{margin:0;padding:0;font-weight:normal;}
    img{border:0 none;max-width:100%;display:block;-webkit-tap-highlight-color:rgba(0,0,0,0.2)}
    i,em,b{font-style:normal;font-weight:normal}
    ul,ol,li,dl,dt,dd{padding:0;margin:0;list-style-type:none;list-style:none}
    input,select,h1,h2,h3,h4,h5,h6{font-size:100%;border-radius:0;}
    table{border-collapse:collapse;border-spacing:0}
    a{text-decoration:none;color:#333}
    .clear:after{content:"\200B";display:block;height:0;clear:both;*zoom:1}
 
    body{margin:0 auto;min-width:320px;/*max-width:640px;*/font-size:14px;color:#929292;-webkit-text-size-adjust:100%; font-family:Helvetica; text-shadow:none;
-webkit-touch-callout:none;
-webkit-user-select:none;
-khtml-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
-o-user-select:none;
}
 
============================================  背景图片自适应,固定不动

background: url('__TMPL__Public/assets/images/demo/banner.jpg') center fixed no-repeat;

height:888px;
background-size:cover;
-moz-background-size:cover;
-webkit-background-size:cover;

 ============================================  问大家一下,软键盘挡住输入框,这个问题大家怎么解决的
 setinterval = setInterval(() => {
      document.body.scrollTop = document.body.scrollHeight;
    }, 50);
    setTimeout(() => {
      clearInterval(setinterval);
    }, 2000);
【群主】张 2017/12/19 14:23:33

输入框获取焦点时执行这个方法

=============================================
 数组中 对象查重

function arrTest(arr,key){
var obj = {};
for(var i=0;i<arr.length;i++){
if(obj[arr[i][key]]){
return false;
}else{
obj[arr[i][key]] = arr[i];
}
return obj;
}
}
var a = [
{ des: "qwe", b: "reg" },
{ des: "vfg", b: "fgdfd" },
{ des: "qwe", b: "fdfd" }
];

arrTest(a,"des")

 -------------------------------------------------------------------
 
 
 
 

Css常用收集的更多相关文章

  1. css常用hack

    原文地址:css常用hack 突然想起今天早上在CNZZ看到的统计数据,使用IE6.7的用户比例还真多,看到之后我的心都碎了.微软都放弃了为毛还有这么多人不死心? 所以说,IE下的兼容还是得做的. – ...

  2. CSS常用样式及示例

    CSS常用样式及示例 一.简介      层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集) ...

  3. CSS常用选择器名

    一.页面结构划分 box 盒子wrap 包裹container 容器 header 头部main 主要区域footer 底部 content 内容区域banner 横幅广告区域menu 菜单 二.模块 ...

  4. CSS常用标签

    CSS常用标签 一 CSS文字属性 color : #999999; /*文字颜色*/ font-family : 宋体,sans-serif; /*文字字体*/ font-size : 9pt; / ...

  5. CSS常用样式(四)之animation

    上篇CSS常用样式(三)这篇博文中已经介绍过了CSS中具有动画效果的transition.transform,今天来大概说说CSS中的animation.animation的加入会使得动画效果更加乐观 ...

  6. DIV+CSS常用网页布局技巧!

    以下是我整理的DIV+CSS常用网页布局技巧,仅供学习与参考! 第一种布局:左边固定宽度,右边自适应宽度 HTML Markup <div id="left">Left ...

  7. 各大浏览器CSS Hack收集

    各大浏览器CSS Hack收集  >>>>>>>>>>>>>>>>>>>>> ...

  8. CSS常用选择器

    关于CSS常用选择器: 1.ID选择器 关于ID选择器具有唯一性,在文档流中,ID是唯一的,在低版本的浏览器中,允许出现不适唯一ID的情况,而在高版本的浏览器中,出现ID不唯一的情况浏览器会出现的报错 ...

  9. css常用文本属性

    [CSS常用文本属性] 1. 字体.字号类: ① font-weight: 字体粗细. bold-加粗.normal-正常.lighter-细体 也可以使用100-900数值,400表示normal, ...

随机推荐

  1. sql-将一个表中的数导入另一个表中

    1.如果2张表的字段一致,并且希望插入全部数据 可以用这种方法: INSERT INTO 目标表 SELECT * FROM 来源表;例: insert into insertTest select ...

  2. selenium+eclispse里代码备注

    1.火狐.谷歌和IE浏览器引擎都要重新下载selenium官网引擎,并设置路径才可以支持selenium3 而狐火用自己的引擎不用设置路径既可以支持selenium2也支持selenium3,谷歌和I ...

  3. js清除浏览器缓存的几种方法

    2014年9月24日 4692次浏览 关于浏览器缓存 浏览器缓存,有时候我们需要他,因为他可以提高网站性能和浏览器速度,提高网站性能.但是有时候我们又不得不清除缓存,因为缓存可能误事,出现一些错误的数 ...

  4. xml解析工具-jdom

    前言:近期接触SSH框架的时候,经常得配置一下xml文件:今天闲来没事就挖挖xml解析的原理供大伙儿分享.本文主要通过一个简单的例子解析一个xml文件.明白其中缘由之后,大家想定义自己的xml也绝非难 ...

  5. Input path does not exist: file:/.......

    注意看是file不存在并不是hdfs,好奇怪,突然明白应该是路径不对,必须加上hdfs://hostname:port/file. 我为什么饭这样的错误是因为前一阵谢了HDFS的曹组,谢了全局File ...

  6. css3的@media媒体查询

    css3新功能,根据屏幕大小进行识别. 参考: http://www.runoob.com/cssref/css3-pr-mediaquery.html

  7. TYVJ1982 武器分配

    描述     后勤部队运来一批武器(机枪和盔甲).你要把这些武器分配给手下的marine们(每人一部机枪,一套盔甲).可是问题来了...    这些武器的型号不相同(武器是由出价最低的承包商制造的), ...

  8. EF-CodeFirst-1 玩起来

    注本文是学习旺杰兄的CodeFirst系列所写 CodeFirst CodeFirst是一种全新的玩法,代码先行使得我们更了解实体之间的关系.而且更加符合了DDD领域驱动设计的思想 .所以CodeFi ...

  9. 加州大学伯克利分校Stat2.3x Inference 统计推断学习笔记: Section 5 Window to a Wider World

    Stat2.3x Inference(统计推断)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

  10. codevs 1432 总数统计

    1432 总数统计 时间限制: 1 s空间限制: 128000 KB题目等级 : 钻石 Diamond   题目描述 Description 给出n个数,统计两两之和小于k的方案数之和. 输入描述 I ...