CSS 盒子阴影

cssweb developmentfront end technology更新于 2024/3/12 5:00:17

CSS box-shadow 属性用于为元素添加阴影效果。以下是添加盒子阴影的示例

示例

<html>
   <head>
      <style>
         div {
            width: 300px;
            height: 100px;
            padding: 15px;
            background-color: red;
            box-shadow: 10px 10px;
         }
      </style>
   </head>
   <body>
      <div>This is a div element with a box-shadow</div>
   </body>
</html>

输出


相关文章


有用资源