CSS 日常练习----box-shadow 发表于 2018-08-09 | 分类于 技术 , Blog记录日常 CSS 练习的小知识点 —— box-shadowbox-shadow点击预览12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>box-shadow练习</title> <style> .mohu1{ width: 200px; height: 200px; background: #000; box-shadow: 0 0 200px red; margin: 200px auto; } .mohu2{ width: 200px; height: 200px; background: #000; box-shadow: 0px 0px 10px 20px red; margin: 200px auto; } .mohu3{ width: 200px; height: 200px; background: #000; box-shadow: 0px 0px 10px 10px red; margin: 200px auto; } .mohu4{ width: 200px; height: 200px; background: #000; box-shadow: 0px 0px 10px 10px red; margin: 200px auto; } .mohu5{ width: 200px; height: 200px; background: #000; box-shadow: 10px 10px 10px red,0px 0px 20px 10px yellow ; margin: 200px auto; } .mohu6{ width: 200px; height: 200px; background: rgba(255,255,255,0.4); box-shadow: 10px 10px 10px red,0px 0px 20px 10px yellow ; margin: 200px auto; } .mohu7{ width: 200px; height: 200px; background: greenyellow; box-shadow: 10px 10px 10px red; margin: 40px auto; } .mohu8{ width: 200px; height: 200px; background: greenyellow; box-shadow: 10px 10px 20px -10px red; margin: 40px auto; } </style></head><body><div class="mohu1">模糊半径的值</div><div class="mohu2">扩展半径1</div><div class="mohu3">扩展半径2</div><div class="mohu4">扩展半径3</div><div class="mohu5">多层阴影效果</div><div class="mohu6">半透明背景下的阴影效果</div><div class="mohu7">邻边投影:方法一</div><div class="mohu8">邻边投影:方法二</div><script> console.log('ddd');</script></body></html>本文作者: bobo本文链接: https://www.anynote.me/3794860730.html版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!