zoukankan      html  css  js  c++  java
  • [CSS] Create Basic Effects with CSS box-shadow

    Learn about the required and expanded syntax of CSS box-shadow. Then, create various kinds of effects such as shadows inside the element, a shadow that equally surrounds the element, realistic placement of the shadow, pseudo-borders, and layered effects by defining multiple shadows.

     
    .card {
      // Required box-shadow props
      // offset-x offset-y color
      box-shadow: 5px 8px black;
    
      // box-shadow blur
      // offset-x offset-y blur-radius color
      box-shadow: 5px 8px 10px black;
    
      // offset-x offset-y blur-radius spread-radius color
      box-shadow: 5px 8px 10px 5px black;
    
      // inset offset-x offset-y blur-radius spread-radius color
      box-shadow: inset 3px 3px 5px 2px black;
    
      // Negative values for offset
      box-shadow: -5px -5px 10px black;
    
      // Negative values for spread-radius
      box-shadow: 8px 8px 8px -6px black;
    
      // blur-radius only for equal shadow
      box-shadow: 0 0 20px black;
    
      // Pseudo-border with spread-radius only
      box-shadow: 0 0 0 5px black;
    
      // Multiple shadows
      box-shadow: 
        // pseudo-border
        0 0 0 3px #79009e, 
        // y-offset shadow with negative spread-radius
        0 10px 20px -5px #79009e;
    }
    
    @import "base";

  • 相关阅读:
    Node.js Net 模块+DNS 模块
    php程序报500错误
    Node.js 工具模块-OS模块+path模块
    Node.js GET/POST请求
    Canvas动画+canvas离屏技术
    Python OS 模块
    Python random 模块
    Python time 模块
    Python 迭代器
    Python 生成器
  • 原文地址:https://www.cnblogs.com/Answer1215/p/13446800.html
Copyright © 2011-2022 走看看