使用 CSS 为元素添加阴影效果
cssweb developmentfront end technology更新于 2024/3/12 3:24:17
使用 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>
输出

相关文章
有用资源
css 参考教程 - 该教程包含有关 css 的更多信息:https://www.cainiaomax.com/css/

