CSS 按钮阴影效果

按钮阴影效果

CSS中,可以通过box-shadow属性来设置按钮button的阴影效果,比如下方的这个按钮示例:


语法

box-shadow的语法和相关的属性值,可参考:box-shadow属性

按钮阴影效果实例代码,及在线编辑器

<br>
<button id='b1'>按钮</button>
<style>
  #b1{border:1px solid grey;width:10%;height:10%;box-shadow:0px 0px 2px;grey;}

</style>

全栈前端 / CSS教程 :



























Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.