zoukankan      html  css  js  c++  java
  • CSS3那些常用的效果

    三角形:

    .triangle{
        0;height:0;
        border:10px solid transparent;
        border-top-color:red; //三角形的方向(相反)、颜色
        //border-left:10px solid red;修改大小以及厚度
    }


    //使用伪类来是实现文字后面的箭头
    .triangle{position:relative;}
    .triangle:after,.triangle:before{
      content:'';
      0;
      height:0;
      border:10px solid transparent;
      border-left:10px solid red;
      position:absolute;
      left:52px;
    }
    //如果想使单线条 after、before 的border-left:10px solid #ccc; 再使用伪类即可
    .triangle:before{
      border-left-color:red;//需要设置的颜色
      left:53px;
    }


    内容箭头(用伪类来实现)
      // 箭头 - :before and :after, 一起组成了好看的气泡小箭头

    .tip:before { //div名称
            position: absolute; 
            display: inline-block; 
            border-top: 7px solid transparent; 
            border-left: 7px solid #eee; //箭头放的方向
            border-bottom: 7px solid transparent; 
            border-left-color: rgba(0, 0, 0, 0.2); //设置透明度0-1直接
            right: -8px; 
            top: 20px; 
            content: ''; 
    }
    //背景阴影 
    .tip:after { 
          position: absolute; 
          display: inline-block; 
          border-top: 6px solid transparent; 
          border-left: 6px solid #eee; 
          border-bottom: 6px solid transparent; 
          right: -6px; //偏移像素
          top: 21px; 
          content: ''; 
    }

    css3美化table

    //.bordered table的class
    .bordered {font-family: 'trebuchet MS', 'Lucida sans', Arial;color: #444;} 
    .bordered th {-webkit-box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;-moz-box-shadow:0 1px 0 rgba(255,255,255,.8) inset;box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;/*表格阴影效果*/
            text-shadow: 0 1px 0 rgba(255,255,255,.5);/*文字阴影效果*/background-color: #dce9f9;/*gradient制作表头渐变色*/
            background-image: -webkit-gradient(linear, left top, left bottom, from(#ebf3fc), to(#dce9f9));
            background-image: -webkit-linear-gradient(top, #ebf3fc, #dce9f9);
            background-image: -moz-linear-gradient(top, #ebf3fc, #dce9f9);
            background-image: -ms-linear-gradient(top, #ebf3fc, #dce9f9);
            background-image: -o-linear-gradient(top, #ebf3fc, #dce9f9);
            background-image: linear-gradient(top, #ebf3fc, #dce9f9);
            filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#ebf3fc, endColorstr=#dce9f9);
            -ms-filter: "progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=#ebf3fc, endColorstr=#dce9f9)";
    }
    .bordered th:first-child {-moz-border-radius: 6px 0 0 0;-webkit-border-radius: 6px 0 0 0;border-radius: 6px 0 0 0;}
    .bordered th:last-child {-moz-border-radius: 0 6px 0 0;-webkit-border-radius: 0 6px 0 0;border-radius: 0 6px 0 0;}
    .bordered tr:last-child td:first-child {-moz-border-radius: 0 0 0 6px;-webkit-border-radius: 0 0 0 6px;border-radius: 0 0 0 6px;}
    .bordered tr:last-child td:last-child {-moz-border-radius: 0 0 6px 0;-webkit-border-radius: 0 0 6px 0;border-radius: 0 0 6px 0;}
  • 相关阅读:
    Hanoi塔
    采药
    进制转换(大数)
    Load Balancing with NGINX 负载均衡算法
    upstream模块实现反向代理的功能
    epoll
    在nginx启动后,如果我们要操作nginx,要怎么做呢 别增加无谓的上下文切换 异步非阻塞的方式来处理请求 worker的个数为cpu的核数 红黑树
    粘性会话 session affinity sticky session requests from the same client to be passed to the same server in a group of servers
    负载均衡 4层协议 7层协议
    A Secure Cookie Protocol 安全cookie协议 配置服务器Cookie
  • 原文地址:https://www.cnblogs.com/houzhao/p/5579788.html
Copyright © 2011-2022 走看看