_______________________________________________________________  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. Android消息机制之ThreadLocal的工作原理

    来源: http://blog.csdn.net/singwhatiwanna/article/details/48350919 很多人认为Handler的作用是更新UI,这说的的确没错,但是更新UI ...

  2. 面向对象_python

    面向对象_python 类(Class): 用来描述具有相同的属性和方法的对象的集合.它定义了该集合中每个对象所共有的属性和方法.对象是类的实例. 类变量:类变量在整个实例化的对象中是公用的.类变量定 ...

  3. 任意List 和DatabTable的转换

     public static IEnumerable<T> ToEntityList<T>(this DataTable table) where T : class      ...

  4. bestcoder杯回顾

    题目列表:hdu5214~5223 5214: 当时第一反应是由递推公式推出通项公式,事实证明这就是作!大!死! 因为通项公式是这样的:L[n]=a^(n-1)*(b+L[1])-b 于是就需要快速幂 ...

  5. centos虚拟机克隆

    vmware vsphere平台上克隆centos6 一.删掉/etc/udev/rules.d/70-persistent-net.rules文件 reboot 二.vim ifcfg-eth0 删 ...

  6. MVC5-10 ModleBinder那点事

    模型绑定器 之前或多或少也提到过模型绑定器,方法的形参就是由模型绑定器把参数绑定上去的,今天就说说ModuleBingder那点事 在MVC中有一个接口叫IModuleBinder // // 摘要: ...

  7. Unity 单例写法

    借鉴自:http://www.cnblogs.com/CodeCabin/p/unity_global_manager.html 实现复杂一些的全局控制,如切换游戏关卡等操作,更常用的方式是使用单例类 ...

  8. HDU 5816 Hearthstone

    Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Problem Descript ...

  9. 数据结构作业——N!的位数(斯特灵公式)

    Description 求N!的位数 Input 输入第一行为一个正整数 n(1<=n<=25000). Output 输出 n!的位数. Sample Input 1020 Sample ...

  10. 【Beta版本】冲刺-Day4

    队伍:606notconnected 会议时间:12月12日 目录 一.行与思 二.站立式会议图片 三.燃尽图 四.代码Check-in 一.行与思 张斯巍(433) 今日进展:协助队友完成界面的修改 ...